fix(BC): Fixing chains transformation on connect

This commit is contained in:
Alex Jbanca 2024-11-28 15:21:29 +02:00 committed by Alex Jbanca
parent 845fd4a445
commit 674b316287
2 changed files with 11 additions and 2 deletions

View File

@ -334,7 +334,7 @@ WalletConnectSDKBase {
url
}
},
requiredNamespaces: supportedNamespaces
requiredNamespaces: JSON.parse(supportedNamespaces)
}
}
return proposal

View File

@ -139,8 +139,17 @@ SQUtils.QObject {
function onSessionProposal(sessionProposal) {
const key = sessionProposal.id
const namespaces = sessionProposal.params.requiredNamespaces
const { chains, _ } = DAppsHelpers.extractChainsAndAccountsFromApprovedNamespaces(namespaces)
d.activeProposals.set(key.toString(), { context: sessionProposal, promise: bcConnectionPromise })
root.newConnectionProposed(key, [1], sessionProposal.params.proposer.metadata.url, sessionProposal.params.proposer.metadata.name, sessionProposal.params.proposer.metadata.icons[0], Constants.DAppConnectors.StatusConnect)
root.newConnectionProposed(
key,
chains,
sessionProposal.params.proposer.metadata.url,
sessionProposal.params.proposer.metadata.name,
sessionProposal.params.proposer.metadata.icons[0],
Constants.DAppConnectors.StatusConnect
)
}
function onApproveSessionResult(proposalId, session, err) {