aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/utils/utils.ts
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/utils.ts
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/utils.ts')
-rw-r--r--packages/website/ts/utils/utils.ts11
1 files changed, 11 insertions, 0 deletions
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;
+ },
};