diff options
author | Dan <danjm.com@gmail.com> | 2017-08-31 02:37:46 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-08-31 07:46:24 +0800 |
commit | 3ea841e27621a8e9972677e46dbd8e3f0c002632 (patch) | |
tree | f61552369772ace329a49ac18350481ce060237f /ui/app/components/send/eth-fee-display.js | |
parent | 5a7e4c4e76fd92b9f797fd2088b00ce6dc4fd47a (diff) | |
download | tangerine-wallet-browser-3ea841e27621a8e9972677e46dbd8e3f0c002632.tar.gz tangerine-wallet-browser-3ea841e27621a8e9972677e46dbd8e3f0c002632.tar.zst tangerine-wallet-browser-3ea841e27621a8e9972677e46dbd8e3f0c002632.zip |
Refactor gas-fee-display to include usd and eth fee displays as separate components.
Diffstat (limited to 'ui/app/components/send/eth-fee-display.js')
-rw-r--r-- | ui/app/components/send/eth-fee-display.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/ui/app/components/send/eth-fee-display.js b/ui/app/components/send/eth-fee-display.js new file mode 100644 index 000000000..3dcb711ce --- /dev/null +++ b/ui/app/components/send/eth-fee-display.js @@ -0,0 +1,37 @@ +const Component = require('react').Component +const h = require('react-hyperscript') +const inherits = require('util').inherits +const EthBalance = require('../eth-balance') +const { getTxFeeBn } = require('../../util') + +module.exports = EthFeeDisplay + +inherits(EthFeeDisplay, Component) +function EthFeeDisplay () { + Component.call(this) +} + +EthFeeDisplay.prototype.render = function () { + const { + currentCurrency, + conversionRate, + gas, + gasPrice, + blockGasLimit, + } = this.props + + return h(EthBalance, { + value: getTxFeeBn(gas, gasPrice, blockGasLimit), + currentCurrency, + conversionRate, + showFiat: false, + hideTooltip: true, + styleOveride: { + color: '#5d5d5d', + fontSize: '16px', + fontFamily: 'DIN OT', + lineHeight: '22.4px' + } + }) +} + |