diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-02-09 04:26:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-09 04:26:12 +0800 |
commit | fbc2d5880f89550a3a31ae1c5d03e07f4c72e45b (patch) | |
tree | aa6ed73dcbcce3f6b2f17022f96cb040b18d23ef /ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js | |
parent | 1a4203a8c608c1ee9e13d4196f1ee0c6cac6886e (diff) | |
parent | 0972e23dcd9c15abe9a3229f9514b3b2f1ccd673 (diff) | |
download | tangerine-wallet-browser-fbc2d5880f89550a3a31ae1c5d03e07f4c72e45b.tar.gz tangerine-wallet-browser-fbc2d5880f89550a3a31ae1c5d03e07f4c72e45b.tar.zst tangerine-wallet-browser-fbc2d5880f89550a3a31ae1c5d03e07f4c72e45b.zip |
Merge pull request #6122 from whymarrh/fix-gas-editing
Fix advanced inline gas editing
Diffstat (limited to 'ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js')
-rw-r--r-- | ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js index 8d404aaca..d99f03308 100644 --- a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js +++ b/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js @@ -58,6 +58,8 @@ export default class ConfirmTransactionBase extends Component { txData: PropTypes.object, unapprovedTxCount: PropTypes.number, currentNetworkUnapprovedTxs: PropTypes.object, + updateGasAndCalculate: PropTypes.func, + customGas: PropTypes.object, // Component props action: PropTypes.string, contentComponent: PropTypes.node, @@ -83,10 +85,7 @@ export default class ConfirmTransactionBase extends Component { valid: PropTypes.bool, warning: PropTypes.string, advancedInlineGasShown: PropTypes.bool, - gasPrice: PropTypes.number, - gasLimit: PropTypes.number, insufficientBalance: PropTypes.bool, - convertThenUpdateGasAndCalculate: PropTypes.func, } state = { @@ -172,10 +171,9 @@ export default class ConfirmTransactionBase extends Component { hexTransactionTotal, hideDetails, advancedInlineGasShown, - gasPrice, - gasLimit, + customGas, insufficientBalance, - convertThenUpdateGasAndCalculate, + updateGasAndCalculate, } = this.props if (hideDetails) { @@ -195,10 +193,10 @@ export default class ConfirmTransactionBase extends Component { /> {advancedInlineGasShown ? <AdvancedGasInputs - updateCustomGasPrice={newGasPrice => convertThenUpdateGasAndCalculate({ gasPrice: newGasPrice, gasLimit })} - updateCustomGasLimit={newGasLimit => convertThenUpdateGasAndCalculate({ gasLimit: newGasLimit, gasPrice })} - customGasPrice={gasPrice} - customGasLimit={gasLimit} + updateCustomGasPrice={newGasPrice => updateGasAndCalculate({ ...customGas, gasPrice: newGasPrice })} + updateCustomGasLimit={newGasLimit => updateGasAndCalculate({ ...customGas, gasLimit: newGasLimit })} + customGasPrice={customGas.gasPrice} + customGasLimit={customGas.gasLimit} insufficientBalance={insufficientBalance} customPriceIsSafe={true} isSpeedUp={false} |