From 66d53d80049fe09491d55ea285cb7dcce10ae14c Mon Sep 17 00:00:00 2001 From: Christian Henriksen Date: Sun, 16 Jul 2023 21:35:19 +0200 Subject: [PATCH] Add contracts to subStoreNames to avoid Error in line 309 --- src/stores.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/stores.js b/src/stores.js index bc1cfe7..e7e9cb5 100644 --- a/src/stores.js +++ b/src/stores.js @@ -41,6 +41,7 @@ const getWindowEthereum = () => { // always get chainId as number EDIT: Always as hex const alwaysHex = (n) => (Web3.utils.isHex(n) ? n : Web3.utils.toHex(n)) +// const alwaysHex = (n) => (Web3.utils.isHex(n) ? Web3.utils.hexToNumber(n) : n) export const createStore = () => { const { emit, get, subscribe, assign, deleteAll } = proxied() @@ -211,7 +212,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())