Skip to content

Commit

Permalink
fix: dapp connections for multiple evm chains (#2673)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicole-obrien authored Jun 27, 2024
1 parent c1fe076 commit 6ea59fb
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ export function buildDefaultNamespaces(): SupportedNamespaces {
continue
}
if (!namespace[network.namespace]) {
const accounts = get(activeAccounts)
.map((account) => getCaip10AddressForAccount(account, network.id) as string)
.filter(Boolean)
namespace[network.namespace] = {
chains: [],
methods: ALL_SUPPORTED_METHODS,
events: SUPPORTED_EVENTS,
accounts,
accounts: [],
}
}
namespace[network.namespace].chains.push(network.id)
const accounts = get(activeAccounts)
.map((account) => getCaip10AddressForAccount(account, network.id) as string)
.filter(Boolean)
namespace[network.namespace].accounts.push(...accounts)
}
return namespace
}

0 comments on commit 6ea59fb

Please sign in to comment.