mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
add goerli to incoming tx
This commit is contained in:
parent
87ac07bb35
commit
03f216e27c
@ -9,15 +9,18 @@ const {
|
|||||||
ROPSTEN_CODE,
|
ROPSTEN_CODE,
|
||||||
RINKEBY_CODE,
|
RINKEBY_CODE,
|
||||||
KOVAN_CODE,
|
KOVAN_CODE,
|
||||||
|
GOERLI_CODE,
|
||||||
ROPSTEN,
|
ROPSTEN,
|
||||||
RINKEBY,
|
RINKEBY,
|
||||||
KOVAN,
|
KOVAN,
|
||||||
|
GOERLI,
|
||||||
MAINNET,
|
MAINNET,
|
||||||
} = require('./network/enums')
|
} = require('./network/enums')
|
||||||
const networkTypeToIdMap = {
|
const networkTypeToIdMap = {
|
||||||
[ROPSTEN]: String(ROPSTEN_CODE),
|
[ROPSTEN]: String(ROPSTEN_CODE),
|
||||||
[RINKEBY]: String(RINKEBY_CODE),
|
[RINKEBY]: String(RINKEBY_CODE),
|
||||||
[KOVAN]: String(KOVAN_CODE),
|
[KOVAN]: String(KOVAN_CODE),
|
||||||
|
[GOERLI]: String(GOERLI_CODE),
|
||||||
[MAINNET]: String(MAINNET_CODE),
|
[MAINNET]: String(MAINNET_CODE),
|
||||||
}
|
}
|
||||||
const fetch = fetchWithTimeout({
|
const fetch = fetchWithTimeout({
|
||||||
@ -52,6 +55,7 @@ class IncomingTransactionsController {
|
|||||||
[ROPSTEN]: null,
|
[ROPSTEN]: null,
|
||||||
[RINKEBY]: null,
|
[RINKEBY]: null,
|
||||||
[KOVAN]: null,
|
[KOVAN]: null,
|
||||||
|
[GOERLI]: null,
|
||||||
[MAINNET]: null,
|
[MAINNET]: null,
|
||||||
},
|
},
|
||||||
}, opts.initState)
|
}, opts.initState)
|
||||||
@ -178,7 +182,7 @@ class IncomingTransactionsController {
|
|||||||
async _fetchTxs (address, fromBlock, networkType) {
|
async _fetchTxs (address, fromBlock, networkType) {
|
||||||
let etherscanSubdomain = 'api'
|
let etherscanSubdomain = 'api'
|
||||||
const currentNetworkID = networkTypeToIdMap[networkType]
|
const currentNetworkID = networkTypeToIdMap[networkType]
|
||||||
const supportedNetworkTypes = [ROPSTEN, RINKEBY, KOVAN, MAINNET]
|
const supportedNetworkTypes = [ROPSTEN, RINKEBY, KOVAN, GOERLI, MAINNET]
|
||||||
|
|
||||||
if (supportedNetworkTypes.indexOf(networkType) === -1) {
|
if (supportedNetworkTypes.indexOf(networkType) === -1) {
|
||||||
return {}
|
return {}
|
||||||
|
@ -9,6 +9,7 @@ const {
|
|||||||
ROPSTEN,
|
ROPSTEN,
|
||||||
RINKEBY,
|
RINKEBY,
|
||||||
KOVAN,
|
KOVAN,
|
||||||
|
GOERLI,
|
||||||
MAINNET,
|
MAINNET,
|
||||||
} = require('../../../../app/scripts/controllers/network/enums')
|
} = require('../../../../app/scripts/controllers/network/enums')
|
||||||
|
|
||||||
@ -19,6 +20,7 @@ describe('IncomingTransactionsController', () => {
|
|||||||
[ROPSTEN]: null,
|
[ROPSTEN]: null,
|
||||||
[RINKEBY]: null,
|
[RINKEBY]: null,
|
||||||
[KOVAN]: null,
|
[KOVAN]: null,
|
||||||
|
[GOERLI]: null,
|
||||||
[MAINNET]: null,
|
[MAINNET]: null,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -31,6 +33,7 @@ describe('IncomingTransactionsController', () => {
|
|||||||
[ROPSTEN]: 1,
|
[ROPSTEN]: 1,
|
||||||
[RINKEBY]: 2,
|
[RINKEBY]: 2,
|
||||||
[KOVAN]: 3,
|
[KOVAN]: 3,
|
||||||
|
[GOERLI]: 5,
|
||||||
[MAINNET]: 4,
|
[MAINNET]: 4,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -43,6 +46,7 @@ describe('IncomingTransactionsController', () => {
|
|||||||
[ROPSTEN]: 1,
|
[ROPSTEN]: 1,
|
||||||
[RINKEBY]: 2,
|
[RINKEBY]: 2,
|
||||||
[KOVAN]: 3,
|
[KOVAN]: 3,
|
||||||
|
[GOERLI]: 5,
|
||||||
[MAINNET]: 4,
|
[MAINNET]: 4,
|
||||||
FAKE_NETWORK: 1111,
|
FAKE_NETWORK: 1111,
|
||||||
},
|
},
|
||||||
@ -243,6 +247,7 @@ describe('IncomingTransactionsController', () => {
|
|||||||
[ROPSTEN]: 1,
|
[ROPSTEN]: 1,
|
||||||
[RINKEBY]: 2,
|
[RINKEBY]: 2,
|
||||||
[KOVAN]: 3,
|
[KOVAN]: 3,
|
||||||
|
[GOERLI]: 5,
|
||||||
[MAINNET]: 4,
|
[MAINNET]: 4,
|
||||||
FAKE_NETWORK: 1111,
|
FAKE_NETWORK: 1111,
|
||||||
},
|
},
|
||||||
@ -262,6 +267,7 @@ describe('IncomingTransactionsController', () => {
|
|||||||
[ROPSTEN]: 1,
|
[ROPSTEN]: 1,
|
||||||
[RINKEBY]: 2,
|
[RINKEBY]: 2,
|
||||||
[KOVAN]: 3,
|
[KOVAN]: 3,
|
||||||
|
[GOERLI]: 5,
|
||||||
[MAINNET]: 4,
|
[MAINNET]: 4,
|
||||||
FAKE_NETWORK: 1111,
|
FAKE_NETWORK: 1111,
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user