aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/utils/utils.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-12-19 02:30:25 +0800
committerFabio Berger <me@fabioberger.com>2017-12-19 02:30:25 +0800
commitfb0b7efc4563c7c561866ab8691361ce6919160b (patch)
treedbbf76c091be331f8a44ed5b7569c7c4742f6fa3 /packages/website/ts/utils/utils.ts
parent400228e139a5c74302f1a16b8ca5c43ea4843307 (diff)
downloaddexon-sol-tools-fb0b7efc4563c7c561866ab8691361ce6919160b.tar
dexon-sol-tools-fb0b7efc4563c7c561866ab8691361ce6919160b.tar.gz
dexon-sol-tools-fb0b7efc4563c7c561866ab8691361ce6919160b.tar.bz2
dexon-sol-tools-fb0b7efc4563c7c561866ab8691361ce6919160b.tar.lz
dexon-sol-tools-fb0b7efc4563c7c561866ab8691361ce6919160b.tar.xz
dexon-sol-tools-fb0b7efc4563c7c561866ab8691361ce6919160b.tar.zst
dexon-sol-tools-fb0b7efc4563c7c561866ab8691361ce6919160b.zip
Refactor configs and constants, standardize on uppercase/snakecase, alphebetize, rename for logical grouping
Diffstat (limited to 'packages/website/ts/utils/utils.ts')
-rw-r--r--packages/website/ts/utils/utils.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index 211a56d45..36cc8f77b 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -15,6 +15,7 @@ import {
Token,
TokenByAddress,
} from 'ts/types';
+import {configs} from 'ts/utils/configs';
import {constants} from 'ts/utils/constants';
import * as u2f from 'ts/vendor/u2f_api';
@@ -136,7 +137,7 @@ export const utils = {
return isUserOnMobile;
},
getEtherScanLinkIfExists(addressOrTxHash: string, networkId: number, suffix: EtherscanLinkSuffixes): string {
- const networkName = constants.networkNameById[networkId];
+ const networkName = constants.NETWORK_NAME_BY_ID[networkId];
if (_.isUndefined(networkName)) {
return undefined;
}
@@ -182,11 +183,11 @@ export const utils = {
},
getCurrentEnvironment() {
switch (location.host) {
- case constants.DEVELOPMENT_DOMAIN:
+ case configs.DOMAIN_DEVELOPMENT:
return 'development';
- case constants.STAGING_DOMAIN:
+ case configs.DOMAIN_STAGING:
return 'staging';
- case constants.PRODUCTION_DOMAIN:
+ case configs.DOMAIN_PRODUCTION:
return 'production';
default:
return 'production';