diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-08-03 07:24:34 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-08-03 07:24:34 +0800 |
commit | b471afcdb34cd121b9d3e3cccb3883943ba8aef5 (patch) | |
tree | a61ff6663e0ccf73c9fd70b9faec15a19a111ea5 | |
parent | 5ac4c2de6fa3a83709eeefc71d5afc0857a28445 (diff) | |
download | tangerine-wallet-browser-b471afcdb34cd121b9d3e3cccb3883943ba8aef5.tar tangerine-wallet-browser-b471afcdb34cd121b9d3e3cccb3883943ba8aef5.tar.gz tangerine-wallet-browser-b471afcdb34cd121b9d3e3cccb3883943ba8aef5.tar.bz2 tangerine-wallet-browser-b471afcdb34cd121b9d3e3cccb3883943ba8aef5.tar.lz tangerine-wallet-browser-b471afcdb34cd121b9d3e3cccb3883943ba8aef5.tar.xz tangerine-wallet-browser-b471afcdb34cd121b9d3e3cccb3883943ba8aef5.tar.zst tangerine-wallet-browser-b471afcdb34cd121b9d3e3cccb3883943ba8aef5.zip |
use error for #approveTransaction when setting failed
-rw-r--r-- | app/scripts/controllers/transactions.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index 720323e41..d4f32e049 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -229,11 +229,8 @@ module.exports = class TransactionController extends EventEmitter { // must set transaction to submitted/failed before releasing lock nonceLock.releaseLock() } catch (err) { - this.setTxStatusFailed(txId, { - stack: err.stack || err.message, - errCode: err.errCode || err, - message: err.message || 'Transaction failed during approval', - }) + if(!err.message) err.message = 'Transaction failed during approval' + this.setTxStatusFailed(txId, err) // must set transaction to submitted/failed before releasing lock if (nonceLock) nonceLock.releaseLock() // continue with error chain |