diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-06-26 02:47:54 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-06-29 01:39:16 +0800 |
commit | 4969797c2327ba0eb92a9723842ab312b6631008 (patch) | |
tree | 5212c6e17bf377bbdf3b5dc3053c9a55e58ba044 /packages/website/ts/utils/utils.ts | |
parent | 0e932286d28dad5c8e79659cb679c75e83c3825d (diff) | |
download | dexon-sol-tools-4969797c2327ba0eb92a9723842ab312b6631008.tar dexon-sol-tools-4969797c2327ba0eb92a9723842ab312b6631008.tar.gz dexon-sol-tools-4969797c2327ba0eb92a9723842ab312b6631008.tar.bz2 dexon-sol-tools-4969797c2327ba0eb92a9723842ab312b6631008.tar.lz dexon-sol-tools-4969797c2327ba0eb92a9723842ab312b6631008.tar.xz dexon-sol-tools-4969797c2327ba0eb92a9723842ab312b6631008.tar.zst dexon-sol-tools-4969797c2327ba0eb92a9723842ab312b6631008.zip |
Remove isTracked field on token in favor of trackedTimestamp
Diffstat (limited to 'packages/website/ts/utils/utils.ts')
-rw-r--r-- | packages/website/ts/utils/utils.ts | 5 |
1 files changed, 4 insertions, 1 deletions
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); + }, }; |