Skip to content

Commit

Permalink
fix: bc on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaccoSordo committed Aug 8, 2024
1 parent f89af23 commit 1059a36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 1 addition & 4 deletions packages/beacon-dapp/src/dapp-client/DAppClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1078,11 +1078,8 @@ export class DAppClient extends Client {
const isResolved = this._transport.isResolved()
const isWCInstance = isResolved && (await this.transport) instanceof WalletConnectTransport
const isLeader = this.multiTabChannel.isLeader()
const isMobile = isMobileOS(window)

return (
!isResolved || (isResolved && (!isWCInstance || (isWCInstance && (isLeader || isMobile))))
)
return !isResolved || (isResolved && (!isWCInstance || (isWCInstance && isLeader)))
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ export class WalletConnectCommunicationClient extends CommunicationClient {
}
}

if (this.signClient && !this.isLeader() && this.isMobileOS()) {
await this.closeSignClient()
}

if (!publicKey) {
throw new Error('Public Key in `tezos_getAccounts` is empty!')
}
Expand Down

0 comments on commit 1059a36

Please sign in to comment.