From ebe09fc31e986e2a6cf79cbcb6c98712da37d240 Mon Sep 17 00:00:00 2001 From: Daniel Marin Date: Tue, 14 Sep 2021 09:27:32 +0100 Subject: [PATCH] fix(angular): wipe selected wallet on adapter disconnect --- packages/angular/src/wallet/wallet.store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/src/wallet/wallet.store.ts b/packages/angular/src/wallet/wallet.store.ts index 3532b5b62..e1547ad00 100644 --- a/packages/angular/src/wallet/wallet.store.ts +++ b/packages/angular/src/wallet/wallet.store.ts @@ -215,7 +215,7 @@ export class WalletStore extends ComponentStore { return this.adapter$.pipe( isNotNull, switchMap((adapter) => - fromAdapterEvent(adapter, 'disconnect').pipe(tap(() => this.patchState(initialState))) + fromAdapterEvent(adapter, 'disconnect').pipe(tap(() => this.patchState({ name: null }))) ) ); });