Skip to content

Commit

Permalink
fix: isMobile Connected
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaccoSordo committed Nov 15, 2024
1 parent ea129f4 commit 5880c81
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Logger } from '@airgap/beacon-core'
import { WalletConnectTransport } from '@airgap/beacon-transport-walletconnect'
import { KeyPair } from '@stablelib/ed25519'
import { SignClientTypes } from '@walletconnect/types'
import { isMobileOS } from '@airgap/beacon-ui'

const logger = new Logger('DappWalletConnectTransport')

Expand Down Expand Up @@ -38,7 +39,7 @@ export class DappWalletConnectTransport extends WalletConnectTransport<
)
this.client.listenForChannelOpening(async (peer: ExtendedWalletConnectPairingResponse) => {
await this.addPeer(peer)
this._isConnected = (await isLeader())
this._isConnected = isMobileOS(window) || (await isLeader())
? TransportStatus.CONNECTED
: TransportStatus.SECONDARY_TAB_CONNECTED
if (this.newPeerListener) {
Expand Down

0 comments on commit 5880c81

Please sign in to comment.