aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/conf-tx.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-03-23 06:14:33 +0800
committerDan Finlay <dan@danfinlay.com>2017-03-23 06:17:57 +0800
commit77907038ffe0edbe5e3472f98fd10d73b76464b8 (patch)
tree2d72d11e05ed8a716248f2b264d79df376532a5c /ui/app/conf-tx.js
parent9f1f0bff1ea3267702a2ab75af293e6265e255e4 (diff)
downloadtangerine-wallet-browser-77907038ffe0edbe5e3472f98fd10d73b76464b8.tar
tangerine-wallet-browser-77907038ffe0edbe5e3472f98fd10d73b76464b8.tar.gz
tangerine-wallet-browser-77907038ffe0edbe5e3472f98fd10d73b76464b8.tar.bz2
tangerine-wallet-browser-77907038ffe0edbe5e3472f98fd10d73b76464b8.tar.lz
tangerine-wallet-browser-77907038ffe0edbe5e3472f98fd10d73b76464b8.tar.xz
tangerine-wallet-browser-77907038ffe0edbe5e3472f98fd10d73b76464b8.tar.zst
tangerine-wallet-browser-77907038ffe0edbe5e3472f98fd10d73b76464b8.zip
Got basic validations working
Diffstat (limited to 'ui/app/conf-tx.js')
-rw-r--r--ui/app/conf-tx.js22
1 files changed, 14 insertions, 8 deletions
diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js
index 07985094c..ce7422f9c 100644
--- a/ui/app/conf-tx.js
+++ b/ui/app/conf-tx.js
@@ -158,7 +158,7 @@ ConfirmTxScreen.prototype.checkBalanceAgainstTx = function (txData) {
}
ConfirmTxScreen.prototype.buyEth = function (address, event) {
- event.stopPropagation()
+ this.stopPropagation(event)
this.props.dispatch(actions.buyEthView(address))
}
@@ -172,14 +172,14 @@ ConfirmTxScreen.prototype.onTxChange = function (txData) {
// Must default to any local state txData,
// to allow manual override of gas calculations.
ConfirmTxScreen.prototype.sendTransaction = function (txData, event) {
- event.stopPropagation()
+ this.stopPropagation(event)
const state = this.state || {}
const txMeta = state.txData
this.props.dispatch(actions.updateAndApproveTx(txMeta || txData))
}
ConfirmTxScreen.prototype.cancelTransaction = function (txData, event) {
- event.stopPropagation()
+ this.stopPropagation(event)
this.props.dispatch(actions.cancelTx(txData))
}
@@ -187,32 +187,38 @@ ConfirmTxScreen.prototype.signMessage = function (msgData, event) {
log.info('conf-tx.js: signing message')
var params = msgData.msgParams
params.metamaskId = msgData.id
- event.stopPropagation()
+ this.stopPropagation(event)
this.props.dispatch(actions.signMsg(params))
}
+ConfirmTxScreen.prototype.stopPropagation = function (event) {
+ if (event.stopPropagation) {
+ event.stopPropagation()
+ }
+}
+
ConfirmTxScreen.prototype.signPersonalMessage = function (msgData, event) {
log.info('conf-tx.js: signing personal message')
var params = msgData.msgParams
params.metamaskId = msgData.id
- event.stopPropagation()
+ this.stopPropagation(event)
this.props.dispatch(actions.signPersonalMsg(params))
}
ConfirmTxScreen.prototype.cancelMessage = function (msgData, event) {
log.info('canceling message')
- event.stopPropagation()
+ this.stopPropagation(event)
this.props.dispatch(actions.cancelMsg(msgData))
}
ConfirmTxScreen.prototype.cancelPersonalMessage = function (msgData, event) {
log.info('canceling personal message')
- event.stopPropagation()
+ this.stopPropagation(event)
this.props.dispatch(actions.cancelPersonalMsg(msgData))
}
ConfirmTxScreen.prototype.goHome = function (event) {
- event.stopPropagation()
+ this.stopPropagation(event)
this.props.dispatch(actions.goHome())
}