diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-03-02 02:01:21 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2017-03-02 02:01:21 +0800 |
commit | 0a3849ec8477b4a61c50d715bd72b3e8f1ea8b66 (patch) | |
tree | cb569b1419363928282cd9ae0b4862d436c8fa58 /ui/app/components/pending-tx.js | |
parent | 930dafc4b0648353f847c529cdc19e2d762553ad (diff) | |
parent | f162a11585392df5e593018a02549f8b03018d22 (diff) | |
download | tangerine-wallet-browser-0a3849ec8477b4a61c50d715bd72b3e8f1ea8b66.tar tangerine-wallet-browser-0a3849ec8477b4a61c50d715bd72b3e8f1ea8b66.tar.gz tangerine-wallet-browser-0a3849ec8477b4a61c50d715bd72b3e8f1ea8b66.tar.bz2 tangerine-wallet-browser-0a3849ec8477b4a61c50d715bd72b3e8f1ea8b66.tar.lz tangerine-wallet-browser-0a3849ec8477b4a61c50d715bd72b3e8f1ea8b66.tar.xz tangerine-wallet-browser-0a3849ec8477b4a61c50d715bd72b3e8f1ea8b66.tar.zst tangerine-wallet-browser-0a3849ec8477b4a61c50d715bd72b3e8f1ea8b66.zip |
Fix merge conflicts.
Diffstat (limited to 'ui/app/components/pending-tx.js')
-rw-r--r-- | ui/app/components/pending-tx.js | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js index 96f968929..d39cbc0f8 100644 --- a/ui/app/components/pending-tx.js +++ b/ui/app/components/pending-tx.js @@ -2,6 +2,7 @@ const Component = require('react').Component const h = require('react-hyperscript') const inherits = require('util').inherits const PendingTxDetails = require('./pending-tx-details') +const extend = require('xtend') module.exports = PendingTx @@ -11,8 +12,9 @@ function PendingTx () { } PendingTx.prototype.render = function () { - var state = this.props - var txData = state.txData + const props = this.props + const newProps = extend(props, {ref: 'details'}) + const txData = props.txData return ( @@ -21,7 +23,7 @@ PendingTx.prototype.render = function () { }, [ // tx info - h(PendingTxDetails, state), + h(PendingTxDetails, newProps), h('style', ` .conf-buttons button { @@ -39,7 +41,7 @@ PendingTx.prototype.render = function () { }, 'Transaction Error. Exception thrown in contract code.') : null, - state.insufficientBalance ? + props.insufficientBalance ? h('span.error', { style: { marginLeft: 50, @@ -57,20 +59,26 @@ PendingTx.prototype.render = function () { }, }, [ - state.insufficientBalance ? + props.insufficientBalance ? h('button.btn-green', { - onClick: state.buyEth, + onClick: props.buyEth, }, 'Buy Ether') : null, h('button.confirm', { - disabled: state.insufficientBalance, - onClick: state.sendTransaction, + disabled: props.insufficientBalance, + onClick: props.sendTransaction, }, 'Accept'), h('button.cancel.btn-red', { - onClick: state.cancelTransaction, + onClick: props.cancelTransaction, }, 'Reject'), + + h('button', { + onClick: () => { + this.refs.details.resetGasFields() + }, + }, 'Reset'), ]), ]) ) |