diff options
author | Dan <danjm.com@gmail.com> | 2017-09-13 04:40:28 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-09-14 05:22:58 +0800 |
commit | 55d62190e3ec06b1b21ed3ba24b2f2a9bc137568 (patch) | |
tree | dc530ddb875efe1bc1c7e13858f8b22c25974606 /ui/app/send.js | |
parent | 6fa1cd62258ba96d1a55bee140f2d1f10f091ed2 (diff) | |
download | tangerine-wallet-browser-55d62190e3ec06b1b21ed3ba24b2f2a9bc137568.tar tangerine-wallet-browser-55d62190e3ec06b1b21ed3ba24b2f2a9bc137568.tar.gz tangerine-wallet-browser-55d62190e3ec06b1b21ed3ba24b2f2a9bc137568.tar.bz2 tangerine-wallet-browser-55d62190e3ec06b1b21ed3ba24b2f2a9bc137568.tar.lz tangerine-wallet-browser-55d62190e3ec06b1b21ed3ba24b2f2a9bc137568.tar.xz tangerine-wallet-browser-55d62190e3ec06b1b21ed3ba24b2f2a9bc137568.tar.zst tangerine-wallet-browser-55d62190e3ec06b1b21ed3ba24b2f2a9bc137568.zip |
Fixes the saving of transactions in send and display in tx-list with conversion utility.
Diffstat (limited to 'ui/app/send.js')
-rw-r--r-- | ui/app/send.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ui/app/send.js b/ui/app/send.js index 96401cd23..a7e81a847 100644 --- a/ui/app/send.js +++ b/ui/app/send.js @@ -20,6 +20,7 @@ const { } = require('./actions') const { stripHexPrefix, addHexPrefix } = require('ethereumjs-util') const { isHex, numericBalance } = require('./util') +const { conversionUtil } = require('./conversion-util') const ARAGON = '960b236A07cf122663c4303350609A66A7B288C0' @@ -666,11 +667,19 @@ SendTransactionScreen.prototype.onSubmit = function () { this.props.dispatch(addToAddressBook(recipient, nickname)) + const sendAmount = conversionUtil(this.state.newTx.amount, { + fromNumericBase: 'dec', + toNumericBase: 'hex', + fromCurrency: this.props.currentCurrency, + toCurrency: 'ETH', + conversionRate: this.props.conversionRate, + }) + var txParams = { from: this.state.newTx.from, to: this.state.newTx.to, - value: this.state.newTx.amount.toString(16), + value: sendAmount, // New: gas will now be specified on this step gas: this.state.newTx.gas, |