mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-14 18:10:56 +00:00
add "testnet" field to config, and filter those values for "dev build" only
This commit is contained in:
parent
85ec63b779
commit
fc4ff5d71c
@ -3,6 +3,7 @@
|
||||
{
|
||||
"type": "ripple",
|
||||
"name": "Ripple Testnet",
|
||||
"testnet": true,
|
||||
"symbol": "XRP",
|
||||
"shortcut": "xrp",
|
||||
"bip44": "m/44'/144'/a'/0/0",
|
||||
@ -52,6 +53,7 @@
|
||||
{
|
||||
"type": "ethereum",
|
||||
"name": "Ethereum Ropsten",
|
||||
"testnet": true,
|
||||
"symbol": "tROP",
|
||||
"shortcut": "trop",
|
||||
"chainId": 3,
|
||||
|
@ -141,10 +141,9 @@ const loadJSON = (): AsyncAction => async (dispatch: Dispatch): Promise<void> =>
|
||||
try {
|
||||
const config: Config = await httpRequest(AppConfigJSON, 'json');
|
||||
|
||||
// remove ropsten testnet from config networks
|
||||
// remove testnets from config networks
|
||||
if (!buildUtils.isDev()) {
|
||||
const index = config.networks.findIndex(c => c.shortcut === 'trop');
|
||||
delete config.networks[index];
|
||||
config.networks = config.networks.filter(n => !n.testnet);
|
||||
}
|
||||
|
||||
const ERC20Abi = await httpRequest(Erc20AbiJSON, 'json');
|
||||
|
@ -8,6 +8,7 @@ import type { Action } from 'flowtype';
|
||||
export type Network = {
|
||||
type: string;
|
||||
name: string;
|
||||
testnet?: boolean;
|
||||
shortcut: string;
|
||||
symbol: string;
|
||||
bip44: string;
|
||||
|
Loading…
Reference in New Issue
Block a user