aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/conf-tx.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-02-28 10:33:33 +0800
committerDan Finlay <dan@danfinlay.com>2017-02-28 10:33:33 +0800
commit3ddfdfff98806065291bb39f31d73879aa4939e8 (patch)
treebcd44c662a60d043b7c278608574caac70d65587 /ui/app/conf-tx.js
parent2e80e8f722e60573764cddfea0b66739626f717a (diff)
downloadtangerine-wallet-browser-3ddfdfff98806065291bb39f31d73879aa4939e8.tar
tangerine-wallet-browser-3ddfdfff98806065291bb39f31d73879aa4939e8.tar.gz
tangerine-wallet-browser-3ddfdfff98806065291bb39f31d73879aa4939e8.tar.bz2
tangerine-wallet-browser-3ddfdfff98806065291bb39f31d73879aa4939e8.tar.lz
tangerine-wallet-browser-3ddfdfff98806065291bb39f31d73879aa4939e8.tar.xz
tangerine-wallet-browser-3ddfdfff98806065291bb39f31d73879aa4939e8.tar.zst
tangerine-wallet-browser-3ddfdfff98806065291bb39f31d73879aa4939e8.zip
Emit updated tx values on accept click
Diffstat (limited to 'ui/app/conf-tx.js')
-rw-r--r--ui/app/conf-tx.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js
index cd4bef2b9..9741d5f32 100644
--- a/ui/app/conf-tx.js
+++ b/ui/app/conf-tx.js
@@ -104,6 +104,8 @@ ConfirmTxScreen.prototype.render = function () {
accounts: props.accounts,
identities: props.identities,
insufficientBalance: this.checkBalanceAgainstTx(txData),
+ // State actions
+ onTxChange: this.updateTxCache.bind(this),
// Actions
buyEth: this.buyEth.bind(this, txParams.from || props.selectedAddress),
sendTransaction: this.sendTransaction.bind(this, txData),
@@ -159,9 +161,19 @@ ConfirmTxScreen.prototype.buyEth = function (address, event) {
this.props.dispatch(actions.buyEthView(address))
}
+// Allows the detail view to update the gas calculations,
+// for manual gas controls.
+ConfirmTxScreen.prototype.onTxChange = function (txData) {
+ this.setState({ txData })
+}
+
+// Must default to any local state txData,
+// to allow manual override of gas calculations.
ConfirmTxScreen.prototype.sendTransaction = function (txData, event) {
event.stopPropagation()
- this.props.dispatch(actions.sendTx(txData))
+ const state = this.state || {}
+ const txMeta = state.txData
+ this.props.dispatch(actions.sendTx(txMeta || txData))
}
ConfirmTxScreen.prototype.cancelTransaction = function (txData, event) {