aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-11-16 05:39:42 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-11-16 05:41:09 +0800
commit14e6b92e2933c570b2436d13ae3ebba7cfffc0e0 (patch)
tree52a1e9fef97105f8b02ff804043ef29279506781
parent1db0bc4b2aa3297e2a621ad3a4378cb940fb90c3 (diff)
parent68d5b459ed406fd8d5e460e3208250530b21aa43 (diff)
downloadtangerine-wallet-browser-14e6b92e2933c570b2436d13ae3ebba7cfffc0e0.tar
tangerine-wallet-browser-14e6b92e2933c570b2436d13ae3ebba7cfffc0e0.tar.gz
tangerine-wallet-browser-14e6b92e2933c570b2436d13ae3ebba7cfffc0e0.tar.bz2
tangerine-wallet-browser-14e6b92e2933c570b2436d13ae3ebba7cfffc0e0.tar.lz
tangerine-wallet-browser-14e6b92e2933c570b2436d13ae3ebba7cfffc0e0.tar.xz
tangerine-wallet-browser-14e6b92e2933c570b2436d13ae3ebba7cfffc0e0.tar.zst
tangerine-wallet-browser-14e6b92e2933c570b2436d13ae3ebba7cfffc0e0.zip
Resolve merge conflicts.
-rw-r--r--CHANGELOG.md1
-rw-r--r--app/scripts/lib/idStore.js8
-rw-r--r--app/scripts/metamask-controller.js1
3 files changed, 5 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d7da7df7b..970ebde80 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
## Current Master
- Show a warning when a transaction fails during simulation.
- Fix bug where 20% of gas estimate was not being added properly.
+- Render error messages in our confirmation screen more gracefully.
## 2.13.7 2016-11-8
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js
index 31895b9bc..eb625987f 100644
--- a/app/scripts/lib/idStore.js
+++ b/app/scripts/lib/idStore.js
@@ -246,7 +246,7 @@ IdentityStore.prototype.addUnconfirmedTransaction = function (txParams, onTxDone
function analyzeForDelegateCall (cb) {
if (txParams.to) {
query.getCode(txParams.to, (err, result) => {
- if (err) return cb(err)
+ if (err) return cb(err.message || err)
var containsDelegateCall = self.checkForDelegateCall(result)
txData.containsDelegateCall = containsDelegateCall
cb()
@@ -261,8 +261,8 @@ IdentityStore.prototype.addUnconfirmedTransaction = function (txParams, onTxDone
// 1 billion gas for estimation
var gasLimit = '0x3b9aca00'
estimationParams.gas = gasLimit
- query.estimateGas(estimationParams, function (err, result) {
- if (err) return cb(err)
+ query.estimateGas(estimationParams, function(err, result){
+ if (err) return cb(err.message || err)
if (result === estimationParams.gas) {
txData.simulationFails = true
query.getBlockByNumber('latest', true, function (err, block) {
@@ -280,7 +280,7 @@ IdentityStore.prototype.addUnconfirmedTransaction = function (txParams, onTxDone
}
function didComplete (err) {
- if (err) return cb(err)
+ if (err) return cb(err.message || err)
configManager.addTx(txData)
// signal update
self._didUpdate()
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 3d6c0eb50..951918460 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -199,7 +199,6 @@ module.exports = class MetamaskController {
newUnsignedTransaction (txParams, onTxDoneCb) {
const keyringController = this.keyringController
-
const err = this.enforceTxValidations(txParams)
if (err) return onTxDoneCb(err)
keyringController.addUnconfirmedTransaction(txParams, onTxDoneCb, (err, txData) => {