mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add test for gas estimate default
This commit is contained in:
parent
0275231e13
commit
943befef91
@ -72,6 +72,25 @@ describe('MetaMaskController', function () {
|
|||||||
|
|
||||||
metamaskController.recentBlocksController = realRecentBlocksController
|
metamaskController.recentBlocksController = realRecentBlocksController
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('gives the 1 gwei price if no blocks have been seen.', async function () {
|
||||||
|
const realRecentBlocksController = metamaskController.recentBlocksController
|
||||||
|
metamaskController.recentBlocksController = {
|
||||||
|
store: {
|
||||||
|
getState: () => {
|
||||||
|
return {
|
||||||
|
recentBlocks: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const gasPrice = metamaskController.getGasPrice()
|
||||||
|
assert.equal(gasPrice, '0x' + GWEI_BN.toString(16), 'defaults to 1 gwei')
|
||||||
|
|
||||||
|
metamaskController.recentBlocksController = realRecentBlocksController
|
||||||
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('#createNewVaultAndKeychain', function () {
|
describe('#createNewVaultAndKeychain', function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user