Merge pull request #5259 from mempool/mononaut/fix-auth-refresh
fix auth refresh race condition
This commit is contained in:
commit
46e8f6137c
@ -120,10 +120,14 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.authSubscription$ = this.authService.getAuth$().subscribe((auth) => {
|
this.authSubscription$ = this.authService.getAuth$().subscribe((auth) => {
|
||||||
this.auth = auth;
|
if (this.auth?.user?.userId !== auth?.user?.userId) {
|
||||||
this.estimate = null;
|
this.auth = auth;
|
||||||
this.error = null;
|
this.estimate = null;
|
||||||
this.moveToStep('summary');
|
this.error = null;
|
||||||
|
this.moveToStep('summary');
|
||||||
|
} else {
|
||||||
|
this.auth = auth;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.authService.refreshAuth$().subscribe();
|
this.authService.refreshAuth$().subscribe();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user