0

I am using ethers.js and Blocknative to connect wallets for my DApp.

I have both MetaMask and OKX Wallet extensions installed on Chrome. Under certain circumstances, when initiating interactions, I encounter the error:

"Invalid parameters: must provide an Ethereum address."

Here's what happens: I first connect to the OKX Wallet via Blocknative, and everything works fine. Then, I disconnect and attempt to reconnect to the MetaMask wallet, also via Blocknative. Although the connection and signing operations go through without issues, I receive the aforementioned error when I try to perform on-chain transactions.

Upon further testing, I discovered that if I disable the OKX Wallet, the connection with MetaMask resumes normal operation. Can you please help me understand why this might be happening?

1
  • Upon further testing, I discovered that if I disable the OKX Wallet, the connection with MetaMask resumes normal operation. This is very normal, more than one web wallet active at once and you can easily have conflicts. It's gotten considerably better over the years, but you are better off toggling off the inactive wallet.
    – Maka
    Apr 19 at 18:04

1 Answer 1

0

It sounds like there might be a conflict between the two wallets when interacting with your dApp.

When you switch from OKX Wallet to MetaMask, there could be lingering configurations or state that affect how transactions are processed. This could result in the error you’re encountering.

As, Maka has mentioned in the comments, it is very normal behavior to experience conflicts when more than one web wallet is active at once.

One possible solution could be to ensure that you completely clear the state or configurations associated with the OKX Wallet when disconnecting from it before connecting to MetaMask. This might involve resetting certain variables or configurations related to wallet connections.

2
  • Thanks, but how can I clear the state or configurations?
    – R L
    Apr 20 at 10:14
  • @RL, you can do that by resetting certain variables or configurations in your dApp, that are related to wallet connections. Apr 20 at 11:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.