aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-10-04 11:02:21 +0800
committerDan Finlay <dan@danfinlay.com>2016-10-04 11:04:44 +0800
commitda611eb3a12a40aba09517c7c8121f9684111e0a (patch)
tree3ff41c024eea364427a14d731e35e27b9e560d86
parenta52c497ad10a980ec9e84e1a9dcc5122c236bcc2 (diff)
downloadtangerine-wallet-browser-da611eb3a12a40aba09517c7c8121f9684111e0a.tar
tangerine-wallet-browser-da611eb3a12a40aba09517c7c8121f9684111e0a.tar.gz
tangerine-wallet-browser-da611eb3a12a40aba09517c7c8121f9684111e0a.tar.bz2
tangerine-wallet-browser-da611eb3a12a40aba09517c7c8121f9684111e0a.tar.lz
tangerine-wallet-browser-da611eb3a12a40aba09517c7c8121f9684111e0a.tar.xz
tangerine-wallet-browser-da611eb3a12a40aba09517c7c8121f9684111e0a.tar.zst
tangerine-wallet-browser-da611eb3a12a40aba09517c7c8121f9684111e0a.zip
Improve popup behavior for parity errors
When we receive an invalid params error, instead of opening the popup and showing no tx, we now just forward that tx back to the UI code.
-rw-r--r--CHANGELOG.md1
-rw-r--r--app/scripts/metamask-controller.js22
2 files changed, 6 insertions, 17 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 84a074480..b6d3d5ed4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
## Current Master
- Fix bug where chosen FIAT exchange rate does no persist when switching networks
+- Fix additional parameters that made MetaMask sometimes receive errors from Parity.
## 2.13.1 2016-09-23
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 9e1a885ae..03082013a 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -203,26 +203,15 @@ module.exports = class MetamaskController {
newUnsignedTransaction (txParams, onTxDoneCb) {
const idStore = this.idStore
- var state = idStore.getState()
let err = this.enforceTxValidations(txParams)
if (err) return onTxDoneCb(err)
- // It's locked
- if (!state.isUnlocked) {
-
- // Allow the environment to define an unlock message.
- this.opts.unlockAccountMessage()
- idStore.addUnconfirmedTransaction(txParams, onTxDoneCb, noop)
-
- // It's unlocked
- } else {
- idStore.addUnconfirmedTransaction(txParams, onTxDoneCb, (err, txData) => {
- if (err) return onTxDoneCb(err)
- this.sendUpdate()
- this.opts.showUnconfirmedTx(txParams, txData, onTxDoneCb)
- })
- }
+ idStore.addUnconfirmedTransaction(txParams, onTxDoneCb, (err, txData) => {
+ if (err) return onTxDoneCb(err)
+ this.sendUpdate()
+ this.opts.showUnconfirmedTx(txParams, txData, onTxDoneCb)
+ })
}
enforceTxValidations (txParams) {
@@ -353,4 +342,3 @@ module.exports = class MetamaskController {
}
}
-function noop () {}