iotaledger / evm-toolkit

EVM Toolkit is a frontend offering user friendly interaction with a L2 ISC chain, including Faucet and Withdrawal from a L2 chain
Apache License 2.0
5 stars 6 forks source link

fix: ensure correct connected network #47

Closed begonaalvarezd closed 3 months ago

begonaalvarezd commented 3 months ago

Description of change

The current toolkit does not check that the network you are connected to is the same that you connected originally, the user might have changed it, leading to actions and balances pointing to the network connected in metamask, but not the selected configured network in the toolkit

This PR aims to fix that by adding a 1s poll to ensure the user is always connected to the right network, if not, the toolkit disconnects

Links to any relevant issues

Type of change

How the change has been tested

Change checklist