aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/dialogs
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-06-26 02:47:54 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-06-29 01:39:16 +0800
commit4969797c2327ba0eb92a9723842ab312b6631008 (patch)
tree5212c6e17bf377bbdf3b5dc3053c9a55e58ba044 /packages/website/ts/components/dialogs
parent0e932286d28dad5c8e79659cb679c75e83c3825d (diff)
downloaddexon-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/components/dialogs')
-rw-r--r--packages/website/ts/components/dialogs/track_token_confirmation_dialog.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/website/ts/components/dialogs/track_token_confirmation_dialog.tsx b/packages/website/ts/components/dialogs/track_token_confirmation_dialog.tsx
index f6594b9d5..3751ce06f 100644
--- a/packages/website/ts/components/dialogs/track_token_confirmation_dialog.tsx
+++ b/packages/website/ts/components/dialogs/track_token_confirmation_dialog.tsx
@@ -1,5 +1,6 @@
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
+import * as moment from 'moment';
import * as React from 'react';
import { Blockchain } from 'ts/blockchain';
import { TrackTokenConfirmation } from 'ts/components/track_token_confirmation';
@@ -73,12 +74,13 @@ export class TrackTokenConfirmationDialog extends React.Component<
this.setState({
isAddingTokenToTracked: true,
});
+ const currentTimestamp = moment().unix();
for (const token of this.props.tokens) {
const newTokenEntry = {
...token,
+ trackedTimestamp: currentTimestamp,
};
- newTokenEntry.isTracked = true;
trackedTokenStorage.addTrackedTokenToUser(this.props.userAddress, this.props.networkId, newTokenEntry);
this.props.dispatcher.updateTokenByAddress([newTokenEntry]);
}