aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/utils
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-02-08 03:21:14 +0800
committerGitHub <noreply@github.com>2018-02-08 03:21:14 +0800
commit68a8acbe7bee113aceb171d8b967da11dd71f0c9 (patch)
tree9a3f48f280976584284b290be5d88721b4738441 /packages/website/ts/utils
parent852811b314de3d62ee9068e3c5cbcfaa0650b058 (diff)
parent063c6b66b64330e0d86b7be91393606221ba5c83 (diff)
downloaddexon-sol-tools-68a8acbe7bee113aceb171d8b967da11dd71f0c9.tar
dexon-sol-tools-68a8acbe7bee113aceb171d8b967da11dd71f0c9.tar.gz
dexon-sol-tools-68a8acbe7bee113aceb171d8b967da11dd71f0c9.tar.bz2
dexon-sol-tools-68a8acbe7bee113aceb171d8b967da11dd71f0c9.tar.lz
dexon-sol-tools-68a8acbe7bee113aceb171d8b967da11dd71f0c9.tar.xz
dexon-sol-tools-68a8acbe7bee113aceb171d8b967da11dd71f0c9.tar.zst
dexon-sol-tools-68a8acbe7bee113aceb171d8b967da11dd71f0c9.zip
Merge pull request #374 from 0xProject/feature/website/addOtherTestnetFaucets
Feature/website/add other testnet faucets
Diffstat (limited to 'packages/website/ts/utils')
-rw-r--r--packages/website/ts/utils/configs.ts24
-rw-r--r--packages/website/ts/utils/constants.ts2
-rw-r--r--packages/website/ts/utils/utils.ts11
3 files changed, 35 insertions, 2 deletions
diff --git a/packages/website/ts/utils/configs.ts b/packages/website/ts/utils/configs.ts
index 874ad04c2..69773eae7 100644
--- a/packages/website/ts/utils/configs.ts
+++ b/packages/website/ts/utils/configs.ts
@@ -124,5 +124,27 @@ export const configs = {
[4]: [`https://rinkeby.infura.io/${INFURA_API_KEY}`],
} as PublicNodeUrlsByNetworkId,
SHOULD_DEPRECATE_OLD_WETH_TOKEN: true,
- SYMBOLS_OF_MINTABLE_TOKENS: ['MKR', 'MLN', 'GNT', 'DGD', 'REP'],
+ SYMBOLS_OF_MINTABLE_KOVAN_TOKENS: ['MKR', 'MLN', 'GNT', 'DGD', 'REP'],
+ SYMBOLS_OF_MINTABLE_RINKEBY_ROPSTEN_TOKENS: [
+ 'TKN0',
+ 'TKN1',
+ 'TKN2',
+ 'TKN3',
+ 'TKN4',
+ 'TKN5',
+ 'TKN6',
+ 'TKN7',
+ 'TKN8',
+ 'TKN9',
+ 'TKN10',
+ 'TKN11',
+ 'TKN12',
+ 'TKN13',
+ 'TKN14',
+ 'TKN15',
+ 'TKN16',
+ 'TKN17',
+ 'TKN18',
+ 'TKN19',
+ ],
};
diff --git a/packages/website/ts/utils/constants.ts b/packages/website/ts/utils/constants.ts
index 26a793f38..3df4c9370 100644
--- a/packages/website/ts/utils/constants.ts
+++ b/packages/website/ts/utils/constants.ts
@@ -69,7 +69,7 @@ export const constants = {
URL_BLOG: 'https://blog.0xproject.com/latest',
URL_DISCOURSE_FORUM: 'https://forum.0xproject.com',
URL_FIREFOX_U2F_ADDON: 'https://addons.mozilla.org/en-US/firefox/addon/u2f-support-add-on/',
- URL_ETHER_FAUCET: 'https://faucet.0xproject.com',
+ URL_TESTNET_FAUCET: 'https://faucet.0xproject.com',
URL_GITHUB_ORG: 'https://github.com/0xProject',
URL_GITHUB_WIKI: 'https://github.com/0xProject/wiki',
URL_METAMASK_CHROME_STORE: 'https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn',
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index 7e69b1c5f..a7865d41b 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -282,4 +282,15 @@ export const utils = {
isTestRpc(nodeVersion: string): boolean {
return _.includes(nodeVersion, 'TestRPC');
},
+ isTestNetwork(networkId: number): boolean {
+ const isTestNetwork = _.includes(
+ [
+ constants.NETWORK_ID_BY_NAME[Networks.Kovan],
+ constants.NETWORK_ID_BY_NAME[Networks.Rinkeby],
+ constants.NETWORK_ID_BY_NAME[Networks.Ropsten],
+ ],
+ networkId,
+ );
+ return isTestNetwork;
+ },
};