From 046774e76877f8f833445c76e2013d7f2c9bfff3 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 22 Mar 2017 12:38:04 -0400 Subject: [PATCH 1/3] Require redux-logger of 2.10.2 and up (#1235) * Require redux-logger of 2.8.1 and up * Bump to 2.10.2 and above, 2.10.1 had critical bug. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 72f3cbb3d..488e7e90d 100644 --- a/package.json +++ b/package.json @@ -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", From 8c7be4340349032655503b4137147e1978b0f0bd Mon Sep 17 00:00:00 2001 From: frankiebee Date: Wed, 22 Mar 2017 09:48:41 -0700 Subject: [PATCH 2/3] Have better error messages --- app/scripts/transaction-manager.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/app/scripts/transaction-manager.js b/app/scripts/transaction-manager.js index c6cfdf11d..31c1c8431 100644 --- a/app/scripts/transaction-manager.js +++ b/app/scripts/transaction-manager.js @@ -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) { From 2ffd42f9f06e1b89b49c12f8ded1c12ecb249c57 Mon Sep 17 00:00:00 2001 From: frankiebee Date: Wed, 22 Mar 2017 09:49:44 -0700 Subject: [PATCH 3/3] Add to CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7e1dc4fc..6621d89f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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.