diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-07-19 21:57:00 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-07-19 21:57:00 +0800 |
commit | 52a6e6357b521e3e290103ba31ab91e9ede79d5c (patch) | |
tree | 648a8cd5eb98036b1ab069c0ee1fc738047d889e /packages/website/ts/blockchain.ts | |
parent | dead04dce8b26a09cb0b451711517bcb4dea182c (diff) | |
download | dexon-sol-tools-52a6e6357b521e3e290103ba31ab91e9ede79d5c.tar dexon-sol-tools-52a6e6357b521e3e290103ba31ab91e9ede79d5c.tar.gz dexon-sol-tools-52a6e6357b521e3e290103ba31ab91e9ede79d5c.tar.bz2 dexon-sol-tools-52a6e6357b521e3e290103ba31ab91e9ede79d5c.tar.lz dexon-sol-tools-52a6e6357b521e3e290103ba31ab91e9ede79d5c.tar.xz dexon-sol-tools-52a6e6357b521e3e290103ba31ab91e9ede79d5c.tar.zst dexon-sol-tools-52a6e6357b521e3e290103ba31ab91e9ede79d5c.zip |
Add lifecycle messages
Diffstat (limited to 'packages/website/ts/blockchain.ts')
-rw-r--r-- | packages/website/ts/blockchain.ts | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts index 5d497dfb1..133cd1f2c 100644 --- a/packages/website/ts/blockchain.ts +++ b/packages/website/ts/blockchain.ts @@ -35,7 +35,7 @@ import * as moment from 'moment'; import * as React from 'react'; import contract = require('truffle-contract'); import { BlockchainWatcher } from 'ts/blockchain_watcher'; -import { TokenSendCompleted } from 'ts/components/flash_messages/token_send_completed'; +import { AssetSendCompleted } from 'ts/components/flash_messages/asset_send_completed'; import { TransactionSubmitted } from 'ts/components/flash_messages/transaction_submitted'; import { trackedTokenStorage } from 'ts/local_storage/tracked_token_storage'; import { tradeHistoryStorage } from 'ts/local_storage/trade_history_storage'; @@ -293,14 +293,15 @@ export class Blockchain { EtherscanLinkSuffixes.Tx, ); // TODO - // this._dispatcher.showFlashMessage( - // React.createElement(TokenSendCompleted, { - // etherScanLinkIfExists, - // token, - // toAddress, - // amountInBaseUnits, - // }), - // ); + this._dispatcher.showFlashMessage( + React.createElement(AssetSendCompleted, { + etherScanLinkIfExists, + toAddress, + amountInBaseUnits, + decimals: constants.DECIMAL_PLACES_ETH, + symbol: constants.ETHER_SYMBOL, + }), + ); } public async transferAsync(token: Token, toAddress: string, amountInBaseUnits: BigNumber): Promise<void> { utils.assert(!_.isUndefined(this._contractWrappers), 'ContractWrappers must be instantiated.'); @@ -323,11 +324,12 @@ export class Blockchain { EtherscanLinkSuffixes.Tx, ); this._dispatcher.showFlashMessage( - React.createElement(TokenSendCompleted, { + React.createElement(AssetSendCompleted, { etherScanLinkIfExists, - token, toAddress, amountInBaseUnits, + decimals: token.decimals, + symbol: token.symbol, }), ); } |