Skip to content

Commit

Permalink
fix: invalid boolean conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
isordo committed Oct 24, 2023
1 parent 295b085 commit 6890e45
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ export class WalletConnectTransport<
if (isLocalStorageAvailable()) {
return ((await new LocalStorage().get(StorageKey.WC_2_CORE_PAIRING)) ?? '[]') !== '[]'
} else {
return !this.client.signClient?.pairing.getAll()?.length
return !!this.client.signClient?.pairing.getAll()?.length
}
}

public async hasSessions() {
if (isLocalStorageAvailable()) {
return ((await new LocalStorage().get(StorageKey.WC_2_CLIENT_SESSION)) ?? '[]') !== '[]'
} else {
return !this.client.signClient?.session.getAll()?.length
return !!this.client.signClient?.session.getAll()?.length
}
}

Expand Down

0 comments on commit 6890e45

Please sign in to comment.