diff --git a/src/stores.js b/src/stores.js index bc1cfe7..6a4ce3c 100644 --- a/src/stores.js +++ b/src/stores.js @@ -39,7 +39,7 @@ const getWindowEthereum = () => { } } -// always get chainId as number EDIT: Always as hex +// always get chainId as hex (required since web3js 4.x.x) const alwaysHex = (n) => (Web3.utils.isHex(n) ? n : Web3.utils.toHex(n)) export const createStore = () => { @@ -211,7 +211,13 @@ const getData = (id) => { return noData } -const subStoreNames = ['web3', 'selectedAccount', 'connected', 'chainId'] +const subStoreNames = [ + 'web3', + 'selectedAccount', + 'connected', + 'chainId', + 'contracts' +] export const makeEvmStores = (name) => { const evmStore = (allStores[name] = createStore())