1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Merge pull request #692 from MetaMask/ParityFix

Improve popup behavior for tx errors
This commit is contained in:
Kevin Serrano 2016-10-04 05:03:00 -07:00 committed by GitHub
commit 67136a54b2
2 changed files with 6 additions and 17 deletions

View File

@ -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

View File

@ -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 () {}