lukso-network / tools-erc725-inspect

Website to check ERC725Y key value stores
https://erc725-inspect.lukso.tech/
Apache License 2.0
9 stars 10 forks source link

feat: New network support with Web3 hook rework #51

Closed fhildeb closed 1 year ago

fhildeb commented 1 year ago

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 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.

Hugoo commented 1 year ago

This could also be replaced with web3!.eth.x or @ts-ignore.

haha no please, no @ts-ignore :p