cf2b6bf568
* fix: handle portfolio staleness upon account change * fix: only consider current account for tx updates * test: add e2e test for account switching * fix: remove unnused data-testid * fix: added todo comment * refactor: move test into existing folder * fix: add account to dependency array * todo: tx reducer * test: update cypress config to pass in env variables * fix: undo unintended change * fix: use process.env * fix: use regex instead of env
31 lines
807 B
JavaScript
31 lines
807 B
JavaScript
/* eslint-env node */
|
|
require('dotenv').config()
|
|
|
|
// Block selection is arbitrary, as e2e tests will build up their own state.
|
|
// The only requirement is that all infrastructure under test (eg Permit2 contracts) are already deployed.
|
|
const BLOCK_NUMBER = 17023328
|
|
|
|
const mainnetFork = {
|
|
url: `https://mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_KEY}`,
|
|
blockNumber: BLOCK_NUMBER,
|
|
httpHeaders: {
|
|
Origin: 'localhost:3000', // infura allowlists requests by origin
|
|
},
|
|
}
|
|
|
|
module.exports = {
|
|
networks: {
|
|
hardhat: {
|
|
chainId: 1,
|
|
forking: mainnetFork,
|
|
accounts: {
|
|
count: 2,
|
|
},
|
|
mining: {
|
|
auto: true, // automine to make tests easier to write.
|
|
interval: 0, // do not interval mine so that tests remain deterministic
|
|
},
|
|
},
|
|
},
|
|
}
|