From 6a26a6d72d81d33cae084dff13cbe62f28133930 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 18 Sep 2017 12:21:05 +0200 Subject: [PATCH 1/2] return string instead of dom element --- src/app/execution/txExecution.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/app/execution/txExecution.js b/src/app/execution/txExecution.js index b910189ad9..c9293b2d4d 100644 --- a/src/app/execution/txExecution.js +++ b/src/app/execution/txExecution.js @@ -1,5 +1,4 @@ 'use strict' -var yo = require('yo-yo') module.exports = { /** @@ -46,17 +45,16 @@ module.exports = { if (!txResult.result.vm.exceptionError) { return ret } - var error = yo` VM error: ${txResult.result.vm.exceptionError}` + var error = `VM error: ${txResult.result.vm.exceptionError}.\n` var msg if (txResult.result.vm.exceptionError === 'invalid opcode') { - msg = yo`` + msg = `\tThe constructor should be payable if you send value.\n\tThe execution might have thrown.\n` ret.error = true } else if (txResult.result.vm.exceptionError === 'out of gas') { - msg = yo`
The transaction ran out of gas. Please increase the Gas Limit.
` + msg = `\tThe transaction ran out of gas. Please increase the Gas Limit.\n` ret.error = true } - ret.message = yo`
${error} ${msg} Debug the transaction to get more information
` + ret.message = `${error}${msg}\tDebug the transaction to get more information.` return ret } } From d813c3466611683fcf7282128e48b6a97eb47a47 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 18 Sep 2017 13:56:12 +0200 Subject: [PATCH 2/2] use specific version of js-beautify, cause 1.7 is broken --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6ea18a8e50..b50b2572cd 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "javascript-serialize": "^1.6.1", "jquery": "^2.2.0", "js-base64": "^2.1.9", - "js-beautify": "^1.6.14", + "js-beautify": "1.6.14", "minixhr": "^3.2.2", "mkdirp": "^0.5.1", "nightwatch": "^0.9.3",