Skip to content

Commit

Permalink
fix(BC): Fixing chains transformation on connect
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjba committed Dec 2, 2024
1 parent 845fd4a commit 674b316
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ WalletConnectSDKBase {
url
}
},
requiredNamespaces: supportedNamespaces
requiredNamespaces: JSON.parse(supportedNamespaces)
}
}
return proposal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 674b316

Please sign in to comment.