diff options
author | Dan Finlay <dan@danfinlay.com> | 2017-05-13 03:41:31 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2017-05-13 03:44:51 +0800 |
commit | 19db11856bef65c38d96eb1d6084d88ab6e7eebc (patch) | |
tree | ed75d3ea84c947ea5fb838b6fb83d75eb596cca2 /ui/app/send.js | |
parent | daec667c16c9a55e6357871a82ff2b863501a393 (diff) | |
download | tangerine-wallet-browser-19db11856bef65c38d96eb1d6084d88ab6e7eebc.tar tangerine-wallet-browser-19db11856bef65c38d96eb1d6084d88ab6e7eebc.tar.gz tangerine-wallet-browser-19db11856bef65c38d96eb1d6084d88ab6e7eebc.tar.bz2 tangerine-wallet-browser-19db11856bef65c38d96eb1d6084d88ab6e7eebc.tar.lz tangerine-wallet-browser-19db11856bef65c38d96eb1d6084d88ab6e7eebc.tar.xz tangerine-wallet-browser-19db11856bef65c38d96eb1d6084d88ab6e7eebc.tar.zst tangerine-wallet-browser-19db11856bef65c38d96eb1d6084d88ab6e7eebc.zip |
Remove redux dependency from eth-balance and its dependent tree
For better unit testability of the conf-tx view.
Diffstat (limited to 'ui/app/send.js')
-rw-r--r-- | ui/app/send.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/ui/app/send.js b/ui/app/send.js index eb32d5e06..d73744f70 100644 --- a/ui/app/send.js +++ b/ui/app/send.js @@ -21,6 +21,7 @@ function mapStateToProps (state) { warning: state.appState.warning, network: state.metamask.network, addressBook: state.metamask.addressBook, + conversionRate: state.metamask.conversionRate, } result.error = result.warning && result.warning.split('.')[0] @@ -40,13 +41,14 @@ function SendTransactionScreen () { SendTransactionScreen.prototype.render = function () { this.persistentFormParentId = 'send-tx-form' - var state = this.props - var address = state.address - var account = state.account - var identity = state.identity - var network = state.network - var identities = state.identities - var addressBook = state.addressBook + var props = this.props + var address = props.address + var account = props.account + var identity = props.identity + var network = props.network + var identities = props.identities + var addressBook = props.addressBook + var conversionRate = props.conversionRate return ( @@ -125,6 +127,7 @@ SendTransactionScreen.prototype.render = function () { h(EthBalance, { value: account && account.balance, + conversionRate, }), ]), @@ -147,7 +150,7 @@ SendTransactionScreen.prototype.render = function () { ]), // error message - state.error && h('span.error.flex-center', state.error), + props.error && h('span.error.flex-center', props.error), // 'to' field h('section.flex-row.flex-center', [ |