Skip to content

Commit

Permalink
fix: Create hw wallet chagne account error (#1485)
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteZhang1024 authored Sep 6, 2022
1 parent 1edc8fd commit d25d972
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/kit/src/background/services/ServiceAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,9 @@ class ServiceAccount extends ServiceBase {
}
}

const walletId = wallet?.id;
const accountId = account?.id;

const status: { boardingCompleted: boolean } = appSelector((s) => s.status);
if (!status.boardingCompleted) {
dispatch(setBoardingCompleted());
Expand All @@ -686,8 +689,8 @@ class ServiceAccount extends ServiceBase {
await this.initWallets();

serviceAccount.changeActiveAccount({
accountId: account?.id ?? null,
walletId: wallet?.id ?? null,
accountId: accountId ?? null,
walletId: walletId ?? null,
});
return wallet;
}
Expand Down

0 comments on commit d25d972

Please sign in to comment.