Skip to content

Commit

Permalink
Merge branch 'master' of github.com:trustwallet/trust-web3-provider
Browse files Browse the repository at this point in the history
  • Loading branch information
y3fers0n committed May 27, 2024
2 parents d1362d1 + 74331fd commit 31497f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ethereum_provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,10 @@ class TrustWeb3Provider extends BaseProvider {

const { chainId } = message.domain || {};

if (!chainId || Number(chainId) !== Number(this.chainId)) {
if (
typeof chainId !== "undefined" &&
Number(chainId) !== Number(this.chainId)
) {
throw new Error(
"Provided chainId does not match the currently active chain"
);
Expand Down

0 comments on commit 31497f0

Please sign in to comment.