Skip to content

Commit

Permalink
Add contracts to subStoreNames to avoid Error in line 309
Browse files Browse the repository at this point in the history
  • Loading branch information
Crelde committed Jul 16, 2023
1 parent 3227517 commit 66d53d8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/stores.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit 66d53d8

Please sign in to comment.