aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/metamask-controller.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-05-30 07:12:36 +0800
committerkumavis <aaron@kumavis.me>2018-05-30 07:12:36 +0800
commit4205d9272991c6523fbb8b9222f86411d0253325 (patch)
tree2dce14c72c4a0a62d57f8889072233e2a1f1f410 /app/scripts/metamask-controller.js
parent219cb83d94566a597f7ffa2ba34454460d2deb5d (diff)
parent5fc24930a7febd919ec6a8f6e9c14f2bac0ef2b2 (diff)
downloadtangerine-wallet-browser-4205d9272991c6523fbb8b9222f86411d0253325.tar
tangerine-wallet-browser-4205d9272991c6523fbb8b9222f86411d0253325.tar.gz
tangerine-wallet-browser-4205d9272991c6523fbb8b9222f86411d0253325.tar.bz2
tangerine-wallet-browser-4205d9272991c6523fbb8b9222f86411d0253325.tar.lz
tangerine-wallet-browser-4205d9272991c6523fbb8b9222f86411d0253325.tar.xz
tangerine-wallet-browser-4205d9272991c6523fbb8b9222f86411d0253325.tar.zst
tangerine-wallet-browser-4205d9272991c6523fbb8b9222f86411d0253325.zip
Merge branch 'master' of github.com:MetaMask/metamask-extension into merge-master
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r--app/scripts/metamask-controller.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 0457b4476..a570f2567 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -45,6 +45,7 @@ const BN = require('ethereumjs-util').BN
const GWEI_BN = new BN('1000000000')
const percentile = require('percentile')
const seedPhraseVerifier = require('./lib/seed-phrase-verifier')
+const cleanErrorStack = require('./lib/cleanErrorStack')
const log = require('loglevel')
module.exports = class MetamaskController extends EventEmitter {
@@ -642,9 +643,9 @@ module.exports = class MetamaskController extends EventEmitter {
case 'signed':
return cb(null, data.rawSig)
case 'rejected':
- return cb(new Error('MetaMask Message Signature: User denied message signature.'))
+ return cb(cleanErrorStack(new Error('MetaMask Message Signature: User denied message signature.')))
default:
- return cb(new Error(`MetaMask Message Signature: Unknown problem: ${JSON.stringify(msgParams)}`))
+ return cb(cleanErrorStack(new Error(`MetaMask Message Signature: Unknown problem: ${JSON.stringify(msgParams)}`)))
}
})
}
@@ -702,7 +703,7 @@ module.exports = class MetamaskController extends EventEmitter {
*/
newUnsignedPersonalMessage (msgParams, cb) {
if (!msgParams.from) {
- return cb(new Error('MetaMask Message Signature: from field is required.'))
+ return cb(cleanErrorStack(new Error('MetaMask Message Signature: from field is required.')))
}
const msgId = this.personalMessageManager.addUnapprovedMessage(msgParams)
@@ -713,9 +714,9 @@ module.exports = class MetamaskController extends EventEmitter {
case 'signed':
return cb(null, data.rawSig)
case 'rejected':
- return cb(new Error('MetaMask Message Signature: User denied message signature.'))
+ return cb(cleanErrorStack(new Error('MetaMask Message Signature: User denied message signature.')))
default:
- return cb(new Error(`MetaMask Message Signature: Unknown problem: ${JSON.stringify(msgParams)}`))
+ return cb(cleanErrorStack(new Error(`MetaMask Message Signature: Unknown problem: ${JSON.stringify(msgParams)}`)))
}
})
}
@@ -781,9 +782,9 @@ module.exports = class MetamaskController extends EventEmitter {
case 'signed':
return cb(null, data.rawSig)
case 'rejected':
- return cb(new Error('MetaMask Message Signature: User denied message signature.'))
+ return cb(cleanErrorStack(new Error('MetaMask Message Signature: User denied message signature.')))
default:
- return cb(new Error(`MetaMask Message Signature: Unknown problem: ${JSON.stringify(msgParams)}`))
+ return cb(cleanErrorStack(new Error(`MetaMask Message Signature: Unknown problem: ${JSON.stringify(msgParams)}`)))
}
})
}