diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-06-23 14:52:45 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-07-07 07:27:08 +0800 |
commit | ea9d51e427b8e607e612a01629bebf153e516ad9 (patch) | |
tree | 6363cd72b7517442c718901cc8b8ed023d134081 /ui/app/components/send_/send-footer | |
parent | b4aaf30d6fe829f18dea68a5e6cc321b9fb00d4e (diff) | |
download | tangerine-wallet-browser-ea9d51e427b8e607e612a01629bebf153e516ad9.tar.gz tangerine-wallet-browser-ea9d51e427b8e607e612a01629bebf153e516ad9.tar.zst tangerine-wallet-browser-ea9d51e427b8e607e612a01629bebf153e516ad9.zip |
Refactor and redesign confirm transaction views
Diffstat (limited to 'ui/app/components/send_/send-footer')
-rw-r--r-- | ui/app/components/send_/send-footer/send-footer.component.js | 6 | ||||
-rw-r--r-- | ui/app/components/send_/send-footer/send-footer.container.js | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/ui/app/components/send_/send-footer/send-footer.component.js b/ui/app/components/send_/send-footer/send-footer.component.js index 6471ae1a3..ff42e58de 100644 --- a/ui/app/components/send_/send-footer/send-footer.component.js +++ b/ui/app/components/send_/send-footer/send-footer.component.js @@ -48,6 +48,7 @@ export default class SendFooter extends Component { // updateTx, update, toAccounts, + history, } = this.props // Should not be needed because submit should be disabled if there are errors. @@ -60,7 +61,7 @@ export default class SendFooter extends Component { // TODO: add nickname functionality addToAddressBookIfNew(to, toAccounts) - editingTransactionId + const promise = editingTransactionId ? update({ amount, editingTransactionId, @@ -73,7 +74,8 @@ export default class SendFooter extends Component { }) : sign({ selectedToken, to, amount, from, gas, gasPrice }) - this.props.history.push(CONFIRM_TRANSACTION_ROUTE) + Promise.resolve(promise) + .then(() => history.push(CONFIRM_TRANSACTION_ROUTE)) } formShouldBeDisabled () { diff --git a/ui/app/components/send_/send-footer/send-footer.container.js b/ui/app/components/send_/send-footer/send-footer.container.js index 260ff40bc..0af6fcfa1 100644 --- a/ui/app/components/send_/send-footer/send-footer.container.js +++ b/ui/app/components/send_/send-footer/send-footer.container.js @@ -87,7 +87,7 @@ function mapDispatchToProps (dispatch) { unapprovedTxs, }) - dispatch(updateTransaction(editingTx)) + return dispatch(updateTransaction(editingTx)) }, addToAddressBookIfNew: (newAddress, toAccounts, nickname = '') => { const hexPrefixedAddress = ethUtil.addHexPrefix(newAddress) |