diff options
author | Brandon Millman <brandon@0xproject.com> | 2018-06-29 01:47:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-29 01:47:43 +0800 |
commit | 0fcbd02d50bd564a9c888f247a4b0a565d928cc6 (patch) | |
tree | 5212c6e17bf377bbdf3b5dc3053c9a55e58ba044 /packages/website/ts/components/dialogs | |
parent | 988a3347582cd812aadeaa0cdaef67389c8d833d (diff) | |
parent | 4969797c2327ba0eb92a9723842ab312b6631008 (diff) | |
download | dexon-sol-tools-0fcbd02d50bd564a9c888f247a4b0a565d928cc6.tar dexon-sol-tools-0fcbd02d50bd564a9c888f247a4b0a565d928cc6.tar.gz dexon-sol-tools-0fcbd02d50bd564a9c888f247a4b0a565d928cc6.tar.bz2 dexon-sol-tools-0fcbd02d50bd564a9c888f247a4b0a565d928cc6.tar.lz dexon-sol-tools-0fcbd02d50bd564a9c888f247a4b0a565d928cc6.tar.xz dexon-sol-tools-0fcbd02d50bd564a9c888f247a4b0a565d928cc6.tar.zst dexon-sol-tools-0fcbd02d50bd564a9c888f247a4b0a565d928cc6.zip |
Merge pull request #762 from 0xProject/feature/website/scroll-to-token
Sort wallet tokens by timestamp added and scroll to newly added token
Diffstat (limited to 'packages/website/ts/components/dialogs')
-rw-r--r-- | packages/website/ts/components/dialogs/track_token_confirmation_dialog.tsx | 4 |
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]); } |