aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-07-11 03:21:09 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-07-11 03:21:09 +0800
commit76e80f631e15fafd7e0bd0117fc1703944cb2fb6 (patch)
tree00c67f00bc4867992a4f4e220029b046a8f38ac6
parentf6e90bb3db99307adea33872e21e8f9bca0a54ac (diff)
downloadtangerine-wallet-browser-76e80f631e15fafd7e0bd0117fc1703944cb2fb6.tar
tangerine-wallet-browser-76e80f631e15fafd7e0bd0117fc1703944cb2fb6.tar.gz
tangerine-wallet-browser-76e80f631e15fafd7e0bd0117fc1703944cb2fb6.tar.bz2
tangerine-wallet-browser-76e80f631e15fafd7e0bd0117fc1703944cb2fb6.tar.lz
tangerine-wallet-browser-76e80f631e15fafd7e0bd0117fc1703944cb2fb6.tar.xz
tangerine-wallet-browser-76e80f631e15fafd7e0bd0117fc1703944cb2fb6.tar.zst
tangerine-wallet-browser-76e80f631e15fafd7e0bd0117fc1703944cb2fb6.zip
Fix multiple signature requests showing an infinite spinner
-rw-r--r--ui/app/components/signature-request.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/ui/app/components/signature-request.js b/ui/app/components/signature-request.js
index bbb340fcf..2e0102d1a 100644
--- a/ui/app/components/signature-request.js
+++ b/ui/app/components/signature-request.js
@@ -22,6 +22,8 @@ const {
conversionRateSelector,
} = require('../selectors.js')
+import { clearConfirmTransaction } from '../ducks/confirm-transaction.duck'
+
const { DEFAULT_ROUTE } = require('../routes')
function mapStateToProps (state) {
@@ -39,6 +41,7 @@ function mapStateToProps (state) {
function mapDispatchToProps (dispatch) {
return {
goHome: () => dispatch(actions.goHome()),
+ clearConfirmTransaction: () => dispatch(clearConfirmTransaction()),
}
}
@@ -247,12 +250,18 @@ SignatureRequest.prototype.renderFooter = function () {
return h('div.request-signature__footer', [
h('button.btn-default.btn--large.request-signature__footer__cancel-button', {
onClick: event => {
- cancel(event).then(() => this.props.history.push(DEFAULT_ROUTE))
+ cancel(event).then(() => {
+ this.props.clearConfirmTransaction()
+ this.props.history.push(DEFAULT_ROUTE)
+ })
},
}, this.context.t('cancel')),
h('button.btn-primary.btn--large', {
onClick: event => {
- sign(event).then(() => this.props.history.push(DEFAULT_ROUTE))
+ sign(event).then(() => {
+ this.props.clearConfirmTransaction()
+ this.props.history.push(DEFAULT_ROUTE)
+ })
},
}, this.context.t('sign')),
])