Skip to content

Commit

Permalink
fix: requests blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaccoSordo committed Nov 19, 2024
1 parent 826d926 commit 01e8e61
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ export class DappWalletConnectTransport extends WalletConnectTransport<
)
this.client.listenForChannelOpening(async (peer: ExtendedWalletConnectPairingResponse) => {
await this.addPeer(peer)

this._isConnected = isMobileOS(window) || (await isLeader())
? TransportStatus.CONNECTED
: TransportStatus.SECONDARY_TAB_CONNECTED

this.isReady.isPending() && this.isReady.resolve(true)

if (this.newPeerListener) {
this.newPeerListener(peer)
this.newPeerListener = undefined // TODO: Remove this once we use the id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class WalletConnectTransport<
> extends Transport<T, K, WalletConnectCommunicationClient> {
public readonly type: TransportType = TransportType.WALLETCONNECT

private isReady = new ExposedPromise<boolean>()
protected isReady = new ExposedPromise<boolean>()

constructor(
name: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -970,8 +970,8 @@ export class WalletConnectCommunicationClient extends CommunicationClient {
)
))
await this.closeSignClient()
await this.storage.resetState()
this.storage.notify('RESET')
this.isMobileOS() && await this.storage.resetState()
this.isMobileOS() && this.storage.notify('RESET')

}

Expand Down

0 comments on commit 01e8e61

Please sign in to comment.