In VM mode, exception = 0 means that an exception happened (weirdly enough)

Finally, browser-solidity won't assume that an out-of-gas transaction was successful.
pull/1/head
Alex Beregszaszi 8 years ago
parent d5b9ea91c5
commit 71ea03c5ef
  1. 2
      src/universal-dapp.js

@ -486,7 +486,7 @@ UniversalDApp.prototype.getCallButton = function (args) {
if (err) {
replaceOutput($result, $('<span/>').text(err).addClass('error'));
// VM only
} else if (self.options.vm && result.vm.exception && result.vm.exceptionError) {
} else if (self.options.vm && result.vm.exception === 0 && result.vm.exceptionError) {
replaceOutput($result, $('<span/>').text('VM Exception: ' + result.vm.exceptionError).addClass('error'));
// VM only
} else if (self.options.vm && result.vm.return === undefined) {

Loading…
Cancel
Save