Skip to content

Commit

Permalink
Merge pull request #647 from airgap-it/fix/wc_ack_flow
Browse files Browse the repository at this point in the history
fix: add '?'address check
  • Loading branch information
AndreasGassmann authored Nov 7, 2023
2 parents 47d9ae1 + e95b46e commit ea76c47
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ export class WalletConnectCommunicationClient extends CommunicationClient {
let session = this.getSession()
let publicKey: string | undefined

if (!session.namespaces.tezos.accounts?.length) {
const accounts = session.namespaces.tezos.accounts ?? []
if (accounts.length > 0 && accounts[0].split(':')[2] === '?') {
const fun = this.eventHandlers.get(ClientEvents.WC_ACK_NOTIFICATION)
fun && fun()
this.requestAccountNamespacePromise = new ExposedPromise()
Expand Down Expand Up @@ -426,8 +427,9 @@ export class WalletConnectCommunicationClient extends CommunicationClient {
// to get data required in the pairing response
try {
let session = await this.openSession(topic)
const accounts = session.namespaces.tezos.accounts ?? []

if (!session.namespaces.tezos.accounts?.length) {
if (accounts.length > 0 && accounts[0].split(':')[2] === '?') {
const fun = this.eventHandlers.get(ClientEvents.WC_ACK_NOTIFICATION)
fun && fun()
this.requestAccountNamespacePromise = new ExposedPromise()
Expand Down

0 comments on commit ea76c47

Please sign in to comment.