Skip to content

Commit

Permalink
fix: updateActiveAccount
Browse files Browse the repository at this point in the history
  • Loading branch information
isordo committed Oct 26, 2023
1 parent 028c604 commit 9bad83d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/beacon-dapp/src/dapp-client/DAppClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,14 @@ export class DAppClient extends Client {

private async updateActiveAccountHandler(address?: string) {
if (address && this._activeAccount.isResolved()) {
let account = await this._activeAccount.promise
account && (account.address = address)
account && (await this.setActiveAccount(account))
const activeAccount = await this._activeAccount.promise

const account = {
...activeAccount,
address: address
} as AccountInfo

await this.setActiveAccount(account)
}
}

Expand Down

0 comments on commit 9bad83d

Please sign in to comment.