Skip to content

Commit

Permalink
fix: revert
Browse files Browse the repository at this point in the history
  • Loading branch information
isordo committed Oct 13, 2023
1 parent d342ebc commit 15f48a7
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions packages/beacon-dapp/src/dapp-client/DAppClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,10 +598,6 @@ export class DAppClient extends Client {
* Returns the active account
*/
public async getActiveAccount(): Promise<AccountInfo | undefined> {
if (!this._activeAccount.isSettled()) {
return undefined
}

return this._activeAccount.promise
}

Expand All @@ -627,11 +623,10 @@ export class DAppClient extends Client {
return
}

const activeAccount = await this.getActiveAccount()

// when I'm resetting the activeAccount
if (!account && activeAccount) {
if (!account && this._activeAccount.isResolved() && (await this.getActiveAccount())) {
const transport = await this.transport
const activeAccount = await this.getActiveAccount()

if (!transport || !activeAccount) {
return
Expand Down Expand Up @@ -1954,4 +1949,4 @@ export class DAppClient extends Client {

return accountInfo
}
}
}

0 comments on commit 15f48a7

Please sign in to comment.