Skip to content

Commit

Permalink
Merge pull request #804 from airgap-it/feat/addAppSwitchingBC
Browse files Browse the repository at this point in the history
fix: app switching over BC
  • Loading branch information
jsamol authored Sep 4, 2024
2 parents 5caa59a + 73498ed commit 8a8508e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/beacon-dapp/src/dapp-client/DAppClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2517,6 +2517,13 @@ export class DAppClient extends Client {
id
})

if (
request.type !== BeaconMessageType.PermissionRequest ||
(this._activeAccount.isResolved() && (await this._activeAccount.promise))
) {
this.tryToAppSwitch()
}

this.events
.emit(messageEvents[BeaconMessageType.PermissionRequest].sent, {
walletInfo: await this.getWalletInfo(),
Expand Down

0 comments on commit 8a8508e

Please sign in to comment.