@web3-react/store
Advanced tools
Comparing version 8.0.5-alpha.0 to 8.0.6-alpha.0
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "8.0.5-alpha.0", | ||
"version": "8.0.6-alpha.0", | ||
"type": "module", | ||
@@ -18,3 +18,3 @@ "exports": "./dist/index.js", | ||
"@ethersproject/address": "^5.4.0", | ||
"@web3-react/types": "^8.0.5-alpha.0" | ||
"@web3-react/types": "^8.0.6-alpha.0" | ||
}, | ||
@@ -24,3 +24,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "b66d6733ff21e2ede6f6d5f05f9be4909d3c9ef0" | ||
"gitHead": "b32f036ca775ecf65861b2c4a4bae09e7cb26718" | ||
} |
@@ -67,35 +67,37 @@ import { ChainIdNotAllowedError, createWeb3ReactStoreAndActions } from './' | ||
test('accounts (empty)', () => { | ||
const [store, actions] = createWeb3ReactStoreAndActions() | ||
const accounts: string[] = [] | ||
actions.update({ accounts }) | ||
expect(store.getState()).toEqual({ | ||
chainId: undefined, | ||
accounts, | ||
activating: false, | ||
error: undefined, | ||
describe('accounts', () => { | ||
test('empty', () => { | ||
const [store, actions] = createWeb3ReactStoreAndActions() | ||
const accounts: string[] = [] | ||
actions.update({ accounts }) | ||
expect(store.getState()).toEqual({ | ||
chainId: undefined, | ||
accounts, | ||
activating: false, | ||
error: undefined, | ||
}) | ||
}) | ||
}) | ||
test('accounts (single)', () => { | ||
const [store, actions] = createWeb3ReactStoreAndActions() | ||
const accounts = ['0x0000000000000000000000000000000000000000'] | ||
actions.update({ accounts }) | ||
expect(store.getState()).toEqual({ | ||
chainId: undefined, | ||
accounts, | ||
activating: false, | ||
error: undefined, | ||
test('single', () => { | ||
const [store, actions] = createWeb3ReactStoreAndActions() | ||
const accounts = ['0x0000000000000000000000000000000000000000'] | ||
actions.update({ accounts }) | ||
expect(store.getState()).toEqual({ | ||
chainId: undefined, | ||
accounts, | ||
activating: false, | ||
error: undefined, | ||
}) | ||
}) | ||
}) | ||
test('accounts (many)', () => { | ||
const [store, actions] = createWeb3ReactStoreAndActions() | ||
const accounts = ['0x0000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000001'] | ||
actions.update({ accounts }) | ||
expect(store.getState()).toEqual({ | ||
chainId: undefined, | ||
accounts, | ||
activating: false, | ||
error: undefined, | ||
test('multiple', () => { | ||
const [store, actions] = createWeb3ReactStoreAndActions() | ||
const accounts = ['0x0000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000001'] | ||
actions.update({ accounts }) | ||
expect(store.getState()).toEqual({ | ||
chainId: undefined, | ||
accounts, | ||
activating: false, | ||
error: undefined, | ||
}) | ||
}) | ||
@@ -102,0 +104,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48638
347