📄️ Setup the provider
Setting up the Provider is an important part during the initialization. Since the application uses Redux for state management, you have to wrap the application with the Redux Provider. Thankfully, we created the EthyleneProvider to simplify the setup process.
Connect your wallet
This hook helps you to obtain your WEB3 connection details in components. The available states are
This hook is used to check whether you are connected to the right network. Also, you can use the switchTo function that is returned from the hook to change the network to correct one.
useOnNetworkChange is used to register events for network change actions. If you want to refresh the page, or update any state on network change, you can use this hook.
useOnAccountsChange is used to register events for account change actions in defined time interval. The default value of this interval is 1000 (milliseconds). It means that, in every 1 second, the app checks the account change and executes the callback. interval is given as second parameter to the hook inside an object in addition to deps. It is used to reassign the event on any value change.