Skip to content

Commit

Permalink
Remove 0x1 status check, incorrect test
Browse files Browse the repository at this point in the history
  • Loading branch information
cgewecke committed Nov 8, 2019
1 parent b24dfd5 commit bafe3e9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
2 changes: 1 addition & 1 deletion packages/web3-core-method/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ Method.prototype._confirmTransaction = function(defer, result, payload) {

if (!receipt.outOfGas &&
(!gasProvided || !isOOG) &&
(receipt.status === true || receipt.status === '0x1' || typeof receipt.status === 'undefined')) {
(receipt.status === true || typeof receipt.status === 'undefined')) {
defer.eventEmitter.emit('receipt', receipt);
defer.resolve(receipt);

Expand Down
23 changes: 0 additions & 23 deletions test/e2e.method.send.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,29 +79,6 @@ describe('method.send [ @E2E ]', function() {
assert(receipt.status === false);
}
});

it('errors on revert using a perfect estimate', async function(){
var estimate = await instance
.methods
.setValue('1')
.estimateGas();

try {
await instance
.methods
.reverts()
.send({from: accounts[0], gas: estimate});

assert.fail();

} catch(err){
var receipt = utils.extractReceipt(err.message);

assert(err.message.includes('revert'))
assert(receipt.status === false);
}

});
});

describe('ws', function() {
Expand Down

0 comments on commit bafe3e9

Please sign in to comment.