Skip to content

Commit

Permalink
fix uc
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvoskamp committed Nov 22, 2024
1 parent 7e1d915 commit 16ab1ca
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
18 changes: 16 additions & 2 deletions packages/adapters/wagmi/src/connectors/UniversalConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,22 @@ export function walletConnect(
* connector later on, however, this chain will not have been approved or rejected
* by the wallet. In this case, the chain is considered stale.
*/
isChainsStale() {
return false
async isChainsStale() {
if (!isNewChainsStale) {
return false
}

const connectorChains = config.chains.map(x => x.id)

const namespaceChains = this.getNamespaceChainsIds()

if (namespaceChains.length && !namespaceChains.some(id => connectorChains.includes(id))) {
return false
}

const requestedChains = await this.getRequestedChainsIds()

return !connectorChains.every(id => requestedChains.includes(Number(id)))
},
async setRequestedChainsIds(chains) {
await config.storage?.setItem(this.requestedChainsStorageKey, chains)
Expand Down
2 changes: 1 addition & 1 deletion packages/appkit/exports/constants.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const PACKAGE_VERSION = '1.5.0'
export const PACKAGE_VERSION = '1.5.1'
1 change: 1 addition & 0 deletions packages/siwe/src/mapToSIWX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export function mapToSIWX(siwe: AppKitSIWEClient): SIWXConfig {

const compareSessionAddress = siweSession?.address.toLowerCase()
const compareCaipAddress = address?.toLowerCase()

if (
!siweSession ||
compareSessionAddress !== compareCaipAddress ||
Expand Down

0 comments on commit 16ab1ca

Please sign in to comment.