Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mholtzman committed Aug 5, 2021
1 parent 3e282b8 commit 62026f4
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions test/main/chains/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,25 +142,6 @@ it('sets legacy gas prices on a new non-London block', done => {
mockConnection.emit('connect')
})

it('sets legacy gas prices on one of the first 120 blocks after the London hardfork', done => {
gasPrice = gweiToHex(7)
block = {
number: addHexPrefix((8897988 + 20).toString(16)), // london block: 8897988
baseFeePerGas: gweiToHex(16)
}

observer = store.observer(() => {
const gas = store('main.networksMeta.ethereum.4.gas.price.levels')
if (gas.fast) {
expect(gas.fast).toBe(gweiToHex(7))

done()
}
})

mockConnection.emit('connect')
})

it('sets fee market prices on a new London block', done => {
block = {
number: addHexPrefix((8897988 + 200).toString(16)), // london block: 8897988
Expand All @@ -178,7 +159,7 @@ it('sets fee market prices on a new London block', done => {
expect(gas.fees.maxFeePerGas).toBe(weiToHex(expectedBaseFee + expectedPriorityFee))

expect(gas.selected).toBe('fast')
expect(gas.levels.fast).toBe(weiToHex(expectedBaseFee + expectedPriorityFee))
expect(gas.levels.fast).toBe(weiToHex((expectedBaseFee * 1.05) + expectedPriorityFee))

done()
}
Expand Down

0 comments on commit 62026f4

Please sign in to comment.