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/components/flash_messages | |
parent | dead04dce8b26a09cb0b451711517bcb4dea182c (diff) | |
download | dexon-0x-contracts-52a6e6357b521e3e290103ba31ab91e9ede79d5c.tar dexon-0x-contracts-52a6e6357b521e3e290103ba31ab91e9ede79d5c.tar.gz dexon-0x-contracts-52a6e6357b521e3e290103ba31ab91e9ede79d5c.tar.bz2 dexon-0x-contracts-52a6e6357b521e3e290103ba31ab91e9ede79d5c.tar.lz dexon-0x-contracts-52a6e6357b521e3e290103ba31ab91e9ede79d5c.tar.xz dexon-0x-contracts-52a6e6357b521e3e290103ba31ab91e9ede79d5c.tar.zst dexon-0x-contracts-52a6e6357b521e3e290103ba31ab91e9ede79d5c.zip |
Add lifecycle messages
Diffstat (limited to 'packages/website/ts/components/flash_messages')
-rw-r--r-- | packages/website/ts/components/flash_messages/asset_send_completed.tsx (renamed from packages/website/ts/components/flash_messages/token_send_completed.tsx) | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/packages/website/ts/components/flash_messages/token_send_completed.tsx b/packages/website/ts/components/flash_messages/asset_send_completed.tsx index f3f1ea2fc..2c48f501b 100644 --- a/packages/website/ts/components/flash_messages/token_send_completed.tsx +++ b/packages/website/ts/components/flash_messages/asset_send_completed.tsx @@ -6,27 +6,28 @@ import * as React from 'react'; import { Token } from 'ts/types'; import { utils } from 'ts/utils/utils'; -interface TokenSendCompletedProps { +interface AssetSendCompletedProps { etherScanLinkIfExists?: string; - token: Token; toAddress: string; amountInBaseUnits: BigNumber; + decimals: number; + symbol: string; } -interface TokenSendCompletedState {} +interface AssetSendCompletedState {} -export class TokenSendCompleted extends React.Component<TokenSendCompletedProps, TokenSendCompletedState> { +export class AssetSendCompleted extends React.Component<AssetSendCompletedProps, AssetSendCompletedState> { public render(): React.ReactNode { const etherScanLink = !_.isUndefined(this.props.etherScanLinkIfExists) && ( <a style={{ color: colors.white }} href={`${this.props.etherScanLinkIfExists}`} target="_blank"> Verify on Etherscan </a> ); - const amountInUnits = Web3Wrapper.toUnitAmount(this.props.amountInBaseUnits, this.props.token.decimals); + const amountInUnits = Web3Wrapper.toUnitAmount(this.props.amountInBaseUnits, this.props.decimals); const truncatedAddress = utils.getAddressBeginAndEnd(this.props.toAddress); return ( <div> - {`Sent ${amountInUnits} ${this.props.token.symbol} to ${truncatedAddress}: `} + {`Sent ${amountInUnits} ${this.props.symbol} to ${truncatedAddress}: `} {etherScanLink} </div> ); |