diff options
author | Chi Kei Chan <chikeichan@gmail.com> | 2017-09-23 05:34:56 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-09-23 05:38:17 +0800 |
commit | e1077836ce916e2bd788451e3f365324024a1c0c (patch) | |
tree | 77954f105cc7c693a57ac8790c928286bed5d384 /ui/app/components/send-token/index.js | |
parent | 13f22ff6b087f3865f84a0672a9013ada88be61a (diff) | |
download | tangerine-wallet-browser-e1077836ce916e2bd788451e3f365324024a1c0c.tar tangerine-wallet-browser-e1077836ce916e2bd788451e3f365324024a1c0c.tar.gz tangerine-wallet-browser-e1077836ce916e2bd788451e3f365324024a1c0c.tar.bz2 tangerine-wallet-browser-e1077836ce916e2bd788451e3f365324024a1c0c.tar.lz tangerine-wallet-browser-e1077836ce916e2bd788451e3f365324024a1c0c.tar.xz tangerine-wallet-browser-e1077836ce916e2bd788451e3f365324024a1c0c.tar.zst tangerine-wallet-browser-e1077836ce916e2bd788451e3f365324024a1c0c.zip |
Add Confirm Send token screen
Diffstat (limited to 'ui/app/components/send-token/index.js')
-rw-r--r-- | ui/app/components/send-token/index.js | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/ui/app/components/send-token/index.js b/ui/app/components/send-token/index.js index 7adbf48dc..dd8ca6b9d 100644 --- a/ui/app/components/send-token/index.js +++ b/ui/app/components/send-token/index.js @@ -1,7 +1,6 @@ const Component = require('react').Component const connect = require('react-redux').connect const h = require('react-hyperscript') -const { addHexPrefix } = require('ethereumjs-util') const classnames = require('classnames') const inherits = require('util').inherits const actions = require('../../actions') @@ -26,20 +25,15 @@ function mapStateToProps (state) { const conversionRate = state.metamask.conversionRate const currentBlockGasLimit = state.metamask.currentBlockGasLimit const accounts = state.metamask.accounts - // const network = state.metamask.network const selectedTokenAddress = state.metamask.selectedTokenAddress const selectedAddress = state.metamask.selectedAddress || Object.keys(accounts)[0] const selectedToken = selectors.getSelectedToken(state) const tokenExchangeRates = state.metamask.tokenExchangeRates const pair = `${selectedToken.symbol.toLowerCase()}_eth` const { rate: tokenExchangeRate = 0 } = tokenExchangeRates[pair] || {} - // const checksumAddress = selectedAddress && ethUtil.toChecksumAddress(selectedAddress) - // const identity = identities[selectedAddress] return { - // sidebarOpen, selectedAddress, - // checksumAddress, selectedTokenAddress, identities, addressBook, @@ -48,9 +42,6 @@ function mapStateToProps (state) { currentBlockGasLimit, selectedToken, warning, - // selectedToken: selectors.getSelectedToken(state), - // identity, - // network, } } @@ -66,11 +57,6 @@ function mapDispatchToProps (dispatch) { dispatch(actions.signTokenTx(tokenAddress, toAddress, amount, txData)) ), updateTokenExchangeRate: token => dispatch(actions.updateTokenExchangeRate(token)), - // showSidebar: () => { dispatch(actions.showSidebar()) }, - // hideSidebar: () => { dispatch(actions.hideSidebar()) }, - // showModal: (payload) => { dispatch(actions.showModal(payload)) }, - // showSendPage: () => { dispatch(actions.showSendPage()) }, - // showSendTokenPage: () => { dispatch(actions.showSendTokenPage()) }, } } @@ -116,7 +102,7 @@ SendTokenScreen.prototype.validate = function () { gasLimit: !gasLimit ? 'Gas Limit Required' : null, } - if(to && !isValidAddress(to)) { + if (to && !isValidAddress(to)) { errors.to = 'Invalid address' } @@ -360,7 +346,7 @@ SendTokenScreen.prototype.render = function () { this.renderAmountInput(), this.renderGasInput(), this.renderMemoInput(), - warning && h('div.send-screen-input-wrapper--error', {}, + warning && h('div.send-screen-input-wrapper--error', h('div.send-screen-input-wrapper__error-message', [ warning, ]) |