fix(WC): Fixing the namespace negotiation for non eip155 chains in pairing process
Check if the approved namespaces contains `eip155` property. Show an unsupported chain error if it doesn't. We should display the unsupported network error when the required namespaces is empty or meets the app supported namespace, but the optional namespace contains only non eip155 chains.
This commit is contained in:
parent
63e0ab35f0
commit
c99697134b
|
@ -195,9 +195,8 @@ SQUtils.QObject {
|
|||
const proposal = d.activeProposals.get(key.toString()).context
|
||||
const dAppUrl = proposal.params.proposer.metadata.url
|
||||
|
||||
if(error || !approvedNamespaces) {
|
||||
// Check that it contains Non conforming namespaces"
|
||||
if (error.includes("Non conforming namespaces")) {
|
||||
if(error || !approvedNamespaces || !approvedNamespaces.eip155) {
|
||||
if (!approvedNamespaces.eip155 || error.includes("Non conforming namespaces")) {
|
||||
root.newConnectionFailed(proposal.id, dAppUrl, Pairing.errors.unsupportedNetwork)
|
||||
} else {
|
||||
root.newConnectionFailed(proposal.id, dAppUrl, Pairing.errors.unknownError)
|
||||
|
|
Loading…
Reference in New Issue