remix-lib tests fixes

pull/7/head
aniket-engg 5 years ago committed by Aniket
parent 399b878aa7
commit 09dc7a4abf
  1. 2
      remix-lib/src/helpers/txResultHelper.js
  2. 8
      remix-lib/test/txResultHelper.js

@ -27,7 +27,7 @@ function resultToRemixTx (txResult) {
if (isHexString(result)) {
returnValue = result
} else if (execResult !== undefined) {
returnValue = execResult.return
returnValue = execResult.returnValue
errorMessage = execResult.exceptionError
}

@ -46,12 +46,11 @@ const VM_RESULT = {
gasRefund: new BN(0),
gasUsed: new BN(GAS_USED_INT),
status: STATUS_OK,
vm: {
exception: 1,
execResult: {
exceptionError: null,
gasRefund: new BN(0),
gasUsed: new BN(GAS_USED_INT),
return: RETURN_VALUE_BUFFER
returnValue: RETURN_VALUE_BUFFER
}
},
transactionHash: TRANSACTION_HASH
@ -103,8 +102,7 @@ tape('converts VM result to RemixTx', function (t) {
t.equal(remixTx.return, RETURN_VALUE_HEX)
t.equal(remixTx.error, null)
txResult.result.vm.exception = 0
txResult.result.vm.exceptionError = 'this is an error'
txResult.result.execResult.exceptionError = 'this is an error'
remixTx = resultToRemixTx(txResult)
t.equal(remixTx.error, 'this is an error')

Loading…
Cancel
Save