From 4969797c2327ba0eb92a9723842ab312b6631008 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Mon, 25 Jun 2018 11:47:54 -0700 Subject: Remove isTracked field on token in favor of trackedTimestamp --- packages/website/ts/utils/configs.ts | 2 +- packages/website/ts/utils/utils.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'packages/website/ts/utils') diff --git a/packages/website/ts/utils/configs.ts b/packages/website/ts/utils/configs.ts index ace8a5ba0..36c067f84 100644 --- a/packages/website/ts/utils/configs.ts +++ b/packages/website/ts/utils/configs.ts @@ -66,7 +66,7 @@ export const configs = { IS_MAINNET_ENABLED: true, GOOGLE_ANALYTICS_ID: 'UA-98720122-1', LAST_LOCAL_STORAGE_FILL_CLEARANCE_DATE: '2017-11-22', - LAST_LOCAL_STORAGE_TRACKED_TOKEN_CLEARANCE_DATE: '2017-12-19', + LAST_LOCAL_STORAGE_TRACKED_TOKEN_CLEARANCE_DATE: '2018-6-25', OUTDATED_WRAPPED_ETHERS: [ { 42: { diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts index 0ebcf737c..d12ae6a98 100644 --- a/packages/website/ts/utils/utils.ts +++ b/packages/website/ts/utils/utils.ts @@ -357,7 +357,7 @@ export const utils = { }, getTrackedTokens(tokenByAddress: TokenByAddress): Token[] { const allTokens = _.values(tokenByAddress); - const trackedTokens = _.filter(allTokens, t => t.isTracked); + const trackedTokens = _.filter(allTokens, t => this.isTokenTracked(t)); return trackedTokens; }, getFormattedAmountFromToken(token: Token, tokenState: TokenState): string { @@ -386,4 +386,7 @@ export const utils = { return BrowserType.Other; } }, + isTokenTracked(token: Token): boolean { + return !_.isUndefined(token.trackedTimestamp); + }, }; -- cgit v1.2.3