diff options
Diffstat (limited to 'ui/app/ducks/gas')
-rw-r--r-- | ui/app/ducks/gas/gas-duck.test.js | 10 | ||||
-rw-r--r-- | ui/app/ducks/gas/gas.duck.js | 30 |
2 files changed, 20 insertions, 20 deletions
diff --git a/ui/app/ducks/gas/gas-duck.test.js b/ui/app/ducks/gas/gas-duck.test.js index e97ef2d9f..82a91d5e7 100644 --- a/ui/app/ducks/gas/gas-duck.test.js +++ b/ui/app/ducks/gas/gas-duck.test.js @@ -465,7 +465,7 @@ describe('Gas Duck', () => { initState, { basicPriceAndTimeEstimatesLastRetrieved: 1000000 } ), - metamask: { provider: { type: 'ropsten' } }, + metamask: { provider: { type: 'ropsten' } }, })) assert.deepEqual( mockDistpatch.getCall(0).args, @@ -542,7 +542,7 @@ describe('Gas Duck', () => { initState, {} ), - metamask: { provider: { type: 'ropsten' } }, + metamask: { provider: { type: 'ropsten' } }, })) assert.deepEqual( mockDistpatch.getCall(0).args, @@ -586,7 +586,7 @@ describe('Gas Duck', () => { initState, {} ), - metamask: { provider: { type: 'ropsten' } }, + metamask: { provider: { type: 'ropsten' } }, })) assert.deepEqual( mockDistpatch.getCall(0).args, @@ -647,7 +647,7 @@ describe('Gas Duck', () => { initState, { priceAndTimeEstimatesLastRetrieved: 1000000 } ), - metamask: { provider: { type: 'ropsten' } }, + metamask: { provider: { type: 'ropsten' } }, })) assert.deepEqual( mockDistpatch.getCall(0).args, @@ -701,7 +701,7 @@ describe('Gas Duck', () => { }], } ), - metamask: { provider: { type: 'ropsten' } }, + metamask: { provider: { type: 'ropsten' } }, })) assert.deepEqual( mockDistpatch.getCall(0).args, diff --git a/ui/app/ducks/gas/gas.duck.js b/ui/app/ducks/gas/gas.duck.js index d57e825c4..e272455fc 100644 --- a/ui/app/ducks/gas/gas.duck.js +++ b/ui/app/ducks/gas/gas.duck.js @@ -372,13 +372,13 @@ export function fetchGasEstimates (blockTime) { const promiseToFetch = Date.now() - timeLastRetrieved > 75000 ? fetch('https://ethgasstation.info/json/predictTable.json', { - 'headers': {}, - 'referrer': 'http://ethgasstation.info/json/', - 'referrerPolicy': 'no-referrer-when-downgrade', - 'body': null, - 'method': 'GET', - 'mode': 'cors'} - ) + 'headers': {}, + 'referrer': 'http://ethgasstation.info/json/', + 'referrerPolicy': 'no-referrer-when-downgrade', + 'body': null, + 'method': 'GET', + 'mode': 'cors'} + ) .then(r => r.json()) .then(r => { const estimatedPricesAndTimes = r.map(({ expectedTime, expectedWait, gasprice }) => ({ expectedTime, expectedWait, gasprice })) @@ -429,14 +429,14 @@ export function fetchGasEstimates (blockTime) { return timeMappedToSeconds }) : Promise.resolve(priceAndTimeEstimates.length - ? priceAndTimeEstimates - : loadLocalStorageData('GAS_API_ESTIMATES') - ) - - return promiseToFetch.then(estimates => { - dispatch(setPricesAndTimeEstimates(estimates)) - dispatch(gasEstimatesLoadingFinished()) - }) + ? priceAndTimeEstimates + : loadLocalStorageData('GAS_API_ESTIMATES') + ) + + return promiseToFetch.then(estimates => { + dispatch(setPricesAndTimeEstimates(estimates)) + dispatch(gasEstimatesLoadingFinished()) + }) } } |