this.authService.getUuid()
.pipe(untilDestroyed(this)) // 1-я отписка
.subscribe(phraseFromServer => {
this.authService.sendPhraseToPlugin()
.pipe(untilDestroyed(this)) // 2-я отписка
.subscribe(signedCert => {
this.signedCert = signedCert;
}
}
this.authService.getUuid().pipe(
switchMap(phraseFromServer => this.authService.sendPhraseToPlugin()),
untilDestroyed(this),
).subscribe(signedCert => {
this.signedCert = signedCert;
})