@web3-react/metamask
Advanced tools
Comparing version 8.2.0 to 8.2.1
@@ -159,3 +159,8 @@ "use strict"; | ||
.catch((error) => { | ||
if (error.code === 4902 && typeof desiredChainIdOrChainParameters !== 'number') { | ||
var _a, _b; | ||
// https://github.com/MetaMask/metamask-mobile/issues/3312#issuecomment-1065923294 | ||
const errorCode = ((_b = (_a = error.data) === null || _a === void 0 ? void 0 : _a.originalError) === null || _b === void 0 ? void 0 : _b.code) || error.code; | ||
// 4902 indicates that the chain has not been added to MetaMask and wallet_addEthereumChain needs to be called | ||
// https://docs.metamask.io/guide/rpc-api.html#wallet-switchethereumchain | ||
if (errorCode === 4902 && typeof desiredChainIdOrChainParameters !== 'number') { | ||
if (!this.provider) | ||
@@ -162,0 +167,0 @@ throw new Error('No provider'); |
@@ -13,3 +13,3 @@ { | ||
}, | ||
"version": "8.2.0", | ||
"version": "8.2.1", | ||
"files": [ | ||
@@ -33,3 +33,4 @@ "dist/*" | ||
"@web3-react/store": "^8.2.0" | ||
} | ||
}, | ||
"gitHead": "6332d11ac377195c0aa516425bf174e22ae0bdf6" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
49031
5
252
0
3