This PR introduces support for the following two networks:
LUKSO Mainnet
LUKSO Testnet
Improvements
It also changes the logic of the Web3 integration: A separate, active hook now manages the Web3 instance for all components again. Whenever the network is swapped, a new instance is created based on the NetworkContext that manages the inputs from the NetworkSwitch component.
The split improves modularity- keeping the network context lean and reducing the use of contexts in general.
Linter
Based on current linter notices, I've also added two IF-Statements, covering the case that the Web3 object might be undefined. As the RPC's are handled by the NetworkSwitch and in case of undefined use the default set within NetworkContext that should never be the case. This could also be replaced with web3!.eth.x or @ts-ignore.
Features
This PR introduces support for the following two networks:
Improvements
It also changes the logic of the Web3 integration: A separate, active hook now manages the Web3 instance for all components again. Whenever the network is swapped, a new instance is created based on the
NetworkContext
that manages the inputs from theNetworkSwitch
component.The split improves modularity- keeping the network context lean and reducing the use of contexts in general.
Linter
Based on current linter notices, I've also added two
IF
-Statements, covering the case that the Web3 object might beundefined
. As the RPC's are handled by theNetworkSwitch
and in case ofundefined
use the default set withinNetworkContext
that should never be the case. This could also be replaced withweb3!.eth.x
or@ts-ignore
.