mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge branch 'master' into i1237-xmlfix2
This commit is contained in:
commit
b5b88392b9
@ -2,6 +2,7 @@
|
||||
|
||||
## Current Master
|
||||
|
||||
- Add better error messages for when a transaction fails on approval
|
||||
- Allow sending to ENS names in send form on Ropsten.
|
||||
- Added an address book functionality that remembers the last 15 unique addresses sent to.
|
||||
- Can now change network to custom RPC URL from lock screen.
|
||||
|
@ -172,7 +172,10 @@ module.exports = class TransactionManager extends EventEmitter {
|
||||
], (err) => {
|
||||
self.nonceLock.leave()
|
||||
if (err) {
|
||||
this.setTxStatusFailed(txId)
|
||||
this.setTxStatusFailed(txId, {
|
||||
errCode: err.errCode || err,
|
||||
message: err.message || 'Transaction failed during approval',
|
||||
})
|
||||
return cb(err)
|
||||
}
|
||||
cb()
|
||||
@ -291,7 +294,10 @@ module.exports = class TransactionManager extends EventEmitter {
|
||||
this._setTxStatus(txId, 'confirmed')
|
||||
}
|
||||
|
||||
setTxStatusFailed (txId) {
|
||||
setTxStatusFailed (txId, reason) {
|
||||
let txMeta = this.getTx(txId)
|
||||
txMeta.err = reason
|
||||
this.updateTx(txMeta)
|
||||
this._setTxStatus(txId, 'failed')
|
||||
}
|
||||
|
||||
@ -312,12 +318,11 @@ module.exports = class TransactionManager extends EventEmitter {
|
||||
var txHash = txMeta.hash
|
||||
var txId = txMeta.id
|
||||
if (!txHash) {
|
||||
txMeta.err = {
|
||||
let errReason = {
|
||||
errCode: 'No hash was provided',
|
||||
message: 'We had an error while submitting this transaction, please try again.',
|
||||
}
|
||||
this.updateTx(txMeta)
|
||||
return this.setTxStatusFailed(txId)
|
||||
return this.setTxStatusFailed(txId, errReason)
|
||||
}
|
||||
this.txProviderUtils.query.getTransactionByHash(txHash, (err, txParams) => {
|
||||
if (err || !txParams) {
|
||||
|
@ -98,7 +98,7 @@
|
||||
"react-tooltip-component": "^0.3.0",
|
||||
"readable-stream": "^2.1.2",
|
||||
"redux": "^3.0.5",
|
||||
"redux-logger": "^2.3.1",
|
||||
"redux-logger": "^2.10.2",
|
||||
"redux-thunk": "^1.0.2",
|
||||
"request-promise": "^4.1.1",
|
||||
"sandwich-expando": "^1.0.5",
|
||||
|
Loading…
Reference in New Issue
Block a user