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:
commit
67136a54b2
@ -3,6 +3,7 @@
|
|||||||
## Current Master
|
## Current Master
|
||||||
|
|
||||||
- Fix bug where chosen FIAT exchange rate does no persist when switching networks
|
- 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
|
## 2.13.1 2016-09-23
|
||||||
|
|
||||||
|
@ -203,26 +203,15 @@ module.exports = class MetamaskController {
|
|||||||
|
|
||||||
newUnsignedTransaction (txParams, onTxDoneCb) {
|
newUnsignedTransaction (txParams, onTxDoneCb) {
|
||||||
const idStore = this.idStore
|
const idStore = this.idStore
|
||||||
var state = idStore.getState()
|
|
||||||
|
|
||||||
let err = this.enforceTxValidations(txParams)
|
let err = this.enforceTxValidations(txParams)
|
||||||
if (err) return onTxDoneCb(err)
|
if (err) return onTxDoneCb(err)
|
||||||
|
|
||||||
// It's locked
|
idStore.addUnconfirmedTransaction(txParams, onTxDoneCb, (err, txData) => {
|
||||||
if (!state.isUnlocked) {
|
if (err) return onTxDoneCb(err)
|
||||||
|
this.sendUpdate()
|
||||||
// Allow the environment to define an unlock message.
|
this.opts.showUnconfirmedTx(txParams, txData, onTxDoneCb)
|
||||||
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)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enforceTxValidations (txParams) {
|
enforceTxValidations (txParams) {
|
||||||
@ -353,4 +342,3 @@ module.exports = class MetamaskController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function noop () {}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user