fix: session approval for non evm chains (#460)

This commit is contained in:
Gancho Radkov 2024-02-05 18:30:56 +02:00 committed by GitHub
parent 898ac4119b
commit d8389feafb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -237,7 +237,7 @@ export default function SessionProposalModal() {
// TODO: improve for multi network
console.log('namespaces', namespaces['eip155'])
const namespaceChains = namespaces['eip155'].chains?.map((c: string) => c.split(':')[1])
const namespaceChains = namespaces['eip155']?.chains?.map((c: string) => c.split(':')[1])
const smartAccountEnabledChains: Chain[] = allowedChains.filter(chain => namespaceChains?.includes(chain.id.toString()))
// We find a request for a chain that is enabled for smart account
if (smartAccountEnabledChains.length) {