CRYPTO NEWS

How can I detect metamask accounts changed and locked?

Hi my dapp doesn’t detect when metamask account changed or locked.

I use react !

useEffect(() => {     window.ethereum.on('accountsChanged', function (accounts) {       console.log(accounts[0]);     });   }, []); 

It did not work. there is no console.log.

I think browser doesn’t know account changed.

and is there anyway that I can notice when my wallet locked ? window.ethereum._metamask.isUnlocked() is deprecated function šŸ™

Reusing a seed phrase on different wallets with different tokens

I want to avoid having too many seed phrases. I have a bit of background but I still didn’t understand everything. If you have experience, do you think it makes sense? Is it a good idea or is it even possible? How would you rather do? Let’s consider this scenario: I have a seed phrase::Listen

I want to avoid having too many seed phrases. I have a bit of background but I still didn’t understand everything. If you have experience, do you think it makes sense? Is it a good idea or is it even possible? How would you rather do?

Let’s consider this scenario: I have a seed phrase used on Metamask. So account 0 exists as default and I put some ETH on it. I use the same seed phrase on another XYZ wallet to receive some XYZ token. I put it on account 1.

I later switch back to Metamask and I create the account 1 but it is yet impossible to have the XYZ token on it. In fact, I am not even sure if anything can be added to Metamask but I guess it’s a realistic case. I know that in this case the generation of account is deterministic so I suppose that Metamask and the XYZ wallet use the same method. I put some BTC on the account 1 of Metamask thinking there is no problem.

Do I lose my XYZ or will I find them when I open my XYZ wallet and does it work well like this? Why?

Is it just a bad idea to reuse the same seed phrase with a different wallet?

What strategy do you have for having several type of cryptos on several wallets?

How can I detect metamask accounts changed and locked?

Shopping cart
There are no products in the cart!
Continue shopping
0