aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/ducks
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/ducks')
-rw-r--r--ui/app/ducks/app/app.js4
-rw-r--r--ui/app/ducks/gas/gas.duck.js33
2 files changed, 33 insertions, 4 deletions
diff --git a/ui/app/ducks/app/app.js b/ui/app/ducks/app/app.js
index 04c8c7422..643051b59 100644
--- a/ui/app/ducks/app/app.js
+++ b/ui/app/ducks/app/app.js
@@ -73,8 +73,8 @@ function reduceApp (state, action) {
gasIsLoading: false,
networkNonce: null,
defaultHdPaths: {
- trezor: `m/44'/60'/0'/0`,
- ledger: `m/44'/60'/0'/0/0`,
+ trezor: `m/44'/373'/0'/0`,
+ ledger: `m/44'/373'/0'/0/0`,
},
lastSelectedProvider: null,
networksTabSelectedRpcUrl: '',
diff --git a/ui/app/ducks/gas/gas.duck.js b/ui/app/ducks/gas/gas.duck.js
index 5a0a236e6..f549e59e6 100644
--- a/ui/app/ducks/gas/gas.duck.js
+++ b/ui/app/ducks/gas/gas.duck.js
@@ -1,5 +1,6 @@
import { clone, uniqBy, flatten } from 'ramda'
import BigNumber from 'bignumber.js'
+import { hexToNumberString } from 'web3-utils'
import {
loadLocalStorageData,
saveLocalStorageData,
@@ -185,8 +186,7 @@ export function fetchBasicGasEstimates () {
const timeLastRetrieved = basicPriceEstimatesLastRetrieved || loadLocalStorageData('BASIC_PRICE_ESTIMATES_LAST_RETRIEVED') || 0
dispatch(basicGasEstimatesLoadingStarted())
-
- const promiseToFetch = Date.now() - timeLastRetrieved > 75000
+ const promiseToFetch = Date.now() - timeLastRetrieved > 7
? fetch('https://dev.blockscale.net/api/gasexpress.json', {
'headers': {},
'referrer': 'https://dev.blockscale.net/api/',
@@ -204,6 +204,7 @@ export function fetchBasicGasEstimates () {
block_time: blockTime,
blockNum,
}) => {
+
const basicEstimates = {
safeLow,
average,
@@ -213,6 +214,22 @@ export function fetchBasicGasEstimates () {
blockNum,
}
+ console.log('[FETCH GAS!!!]', basicEstimates)
+
+ fetch('https://testnet-rpc.tangerine-network.io', {
+ 'headers': {
+ 'Content-Type': 'application/json',
+ },
+ 'body': '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":67}',
+ 'method': 'POST',
+ })
+ .then(r => r.json())
+ .then((res) => {
+ console.log(res)
+ // const gasEstimate = parseInt(hexToNumberString(res).slice(0, -9))
+ // console.log('RES FROM TANGERINE RPC!!!!!', res, gasEstimate)
+ })
+
const timeRetrieved = Date.now()
dispatch(setBasicPriceEstimatesLastRetrieved(timeRetrieved))
saveLocalStorageData(timeRetrieved, 'BASIC_PRICE_ESTIMATES_LAST_RETRIEVED')
@@ -243,6 +260,18 @@ export function fetchBasicGasAndTimeEstimates () {
dispatch(basicGasEstimatesLoadingStarted())
+ fetch('https://testnet-rpc.tangerine-network.io', {
+ 'headers': {
+ 'Content-Type': 'application/json',
+ },
+ 'body': '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":67}',
+ 'method': 'POST',
+ })
+ .then(r => r.json())
+ .then((res) => {
+ console.log('RES FROM TANGERINE RPC!!!!!', res)
+ })
+
const promiseToFetch = Date.now() - timeLastRetrieved > 75000
? fetch('https://ethgasstation.info/json/ethgasAPI.json', {
'headers': {},