aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/utils/utils.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-07-17 18:59:02 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-07-17 18:59:02 +0800
commitbf8ac3b9e6ee59f267f7850418febfe84dedceb8 (patch)
tree0617e583892f9a8fe96a55dcac3a7f9af1ddae10 /packages/website/ts/utils/utils.ts
parentedcdc9b1b903158cc61529853d7e9028ecbc266a (diff)
downloaddexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar
dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.gz
dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.bz2
dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.lz
dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.xz
dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.zst
dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.zip
Fix tslint issues
Diffstat (limited to 'packages/website/ts/utils/utils.ts')
-rw-r--r--packages/website/ts/utils/utils.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index 739bb7b66..e656d5963 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -59,7 +59,7 @@ export const utils = {
return moment.unix(unixTimestampSec.toNumber());
},
convertToReadableDateTimeFromUnixTimestamp(unixTimestampSec: BigNumber): string {
- const m = this.convertToMomentFromUnixTimestamp(unixTimestampSec);
+ const m = utils.convertToMomentFromUnixTimestamp(unixTimestampSec);
const formattedDate: string = m.format('h:MMa MMMM D YYYY');
return formattedDate;
},
@@ -299,12 +299,12 @@ export const utils = {
const baseUrl = `https://${window.location.hostname}${hasPort ? `:${port}` : ''}`;
return baseUrl;
},
- onPageLoadPromise: new Promise((resolve, _reject) => {
+ onPageLoadPromise: new Promise<void>((resolve, _reject) => {
if (document.readyState === 'complete') {
resolve();
return;
}
- window.onload = resolve;
+ window.onload = () => resolve();
}),
getProviderType(provider: Provider): Providers | string {
const constructorName = provider.constructor.name;
@@ -364,7 +364,7 @@ export const utils = {
return Environments.UNKNOWN;
},
shouldShowJobsPage(): boolean {
- return this.isDevelopment() || this.isStaging() || this.isDogfood();
+ return utils.isDevelopment() || utils.isStaging() || utils.isDogfood();
},
getEthToken(tokenByAddress: TokenByAddress): Token {
return utils.getTokenBySymbol(constants.ETHER_TOKEN_SYMBOL, tokenByAddress);
@@ -379,7 +379,7 @@ export const utils = {
},
getTrackedTokens(tokenByAddress: TokenByAddress): Token[] {
const allTokens = _.values(tokenByAddress);
- const trackedTokens = _.filter(allTokens, t => this.isTokenTracked(t));
+ const trackedTokens = _.filter(allTokens, t => utils.isTokenTracked(t));
return trackedTokens;
},
getFormattedAmountFromToken(token: Token, tokenState: TokenState): string {