web3-core-method
Advanced tools
Comparing version 1.0.0-beta.33 to 1.0.0-beta.34
{ | ||
"name": "web3-core-method", | ||
"namespace": "ethereum", | ||
"version": "1.0.0-beta.33", | ||
"version": "1.0.0-beta.34", | ||
"description": "Creates the methods on the web3 modules. This is an internal package.", | ||
@@ -11,7 +11,7 @@ "repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-core-method", | ||
"underscore": "1.8.3", | ||
"web3-core-helpers": "1.0.0-beta.33", | ||
"web3-core-promievent": "1.0.0-beta.33", | ||
"web3-core-subscriptions": "1.0.0-beta.33", | ||
"web3-utils": "1.0.0-beta.33" | ||
"web3-core-helpers": "1.0.0-beta.34", | ||
"web3-core-promievent": "1.0.0-beta.34", | ||
"web3-core-subscriptions": "1.0.0-beta.34", | ||
"web3-utils": "1.0.0-beta.34" | ||
} | ||
} |
@@ -351,3 +351,4 @@ /* | ||
if(!receipt.outOfGas && | ||
(!gasProvided || gasProvided !== receipt.gasUsed)) { | ||
(!gasProvided || gasProvided !== receipt.gasUsed) && | ||
(receipt.status === true || receipt.status === '0x1' || typeof receipt.status === 'undefined')) { | ||
defer.eventEmitter.emit('receipt', receipt); | ||
@@ -365,3 +366,10 @@ defer.resolve(receipt); | ||
} | ||
utils._fireError(new Error("Transaction ran out of gas. Please provide more gas:\n"+ receipt), defer.eventEmitter, defer.reject); | ||
if (receipt.status === false || receipt.status === '0x0') { | ||
utils._fireError(new Error("Transaction has been reverted by the EVM:\n" + receipt), | ||
defer.eventEmitter, defer.reject); | ||
} else { | ||
utils._fireError( | ||
new Error("Transaction ran out of gas. Please provide more gas:\n" + receipt), | ||
defer.eventEmitter, defer.reject); | ||
} | ||
} | ||
@@ -405,30 +413,30 @@ | ||
// start watching for confirmation depending on the support features of the provider | ||
var startWatching = function(existingReceipt) { | ||
// if provider allows PUB/SUB | ||
if (_.isFunction(this.requestManager.provider.on)) { | ||
_ethereumCall.subscribe('newBlockHeaders', checkConfirmation.bind(null, existingReceipt, false)); | ||
} else { | ||
intervalId = setInterval(checkConfirmation.bind(null, existingReceipt, true), 1000); | ||
} | ||
}.bind(this); | ||
// start watching for confirmation depending on the support features of the provider | ||
var startWatching = function(existingReceipt) { | ||
// if provider allows PUB/SUB | ||
if (_.isFunction(this.requestManager.provider.on)) { | ||
_ethereumCall.subscribe('newBlockHeaders', checkConfirmation.bind(null, existingReceipt, false)); | ||
} else { | ||
intervalId = setInterval(checkConfirmation.bind(null, existingReceipt, true), 1000); | ||
} | ||
}.bind(this); | ||
// first check if we already have a confirmed transaction | ||
_ethereumCall.getTransactionReceipt(result) | ||
.then(function(receipt) { | ||
if (receipt && receipt.blockHash) { | ||
if (defer.eventEmitter.listeners('confirmation').length > 0) { | ||
// We must keep on watching for new Blocks, if a confirmation listener is present | ||
startWatching(receipt); | ||
} | ||
checkConfirmation(receipt, false); | ||
// first check if we already have a confirmed transaction | ||
_ethereumCall.getTransactionReceipt(result) | ||
.then(function(receipt) { | ||
if (receipt && receipt.blockHash) { | ||
if (defer.eventEmitter.listeners('confirmation').length > 0) { | ||
// We must keep on watching for new Blocks, if a confirmation listener is present | ||
startWatching(receipt); | ||
} | ||
checkConfirmation(receipt, false); | ||
} else if (!promiseResolved) { | ||
startWatching(); | ||
} | ||
}) | ||
.catch(function(){ | ||
if (!promiseResolved) startWatching(); | ||
}); | ||
} else if (!promiseResolved) { | ||
startWatching(); | ||
} | ||
}) | ||
.catch(function(){ | ||
if (!promiseResolved) startWatching(); | ||
}); | ||
@@ -499,3 +507,3 @@ }; | ||
// return PROMIEVENT | ||
// return PROMIEVENT | ||
} else { | ||
@@ -537,3 +545,3 @@ defer.eventEmitter.emit('transactionHash', result); | ||
// ETH_SIGN | ||
// ETH_SIGN | ||
} else if (payload.method === 'eth_sign') { | ||
@@ -540,0 +548,0 @@ var data = payload.params[1]; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22436
505
+ Addedweb3-core-helpers@1.0.0-beta.34(transitive)
+ Addedweb3-core-promievent@1.0.0-beta.34(transitive)
+ Addedweb3-core-subscriptions@1.0.0-beta.34(transitive)
+ Addedweb3-eth-iban@1.0.0-beta.34(transitive)
+ Addedweb3-utils@1.0.0-beta.34(transitive)
- Removedweb3-core-helpers@1.0.0-beta.33(transitive)
- Removedweb3-core-promievent@1.0.0-beta.33(transitive)
- Removedweb3-core-subscriptions@1.0.0-beta.33(transitive)
- Removedweb3-eth-iban@1.0.0-beta.33(transitive)
- Removedweb3-utils@1.0.0-beta.33(transitive)
Updatedweb3-utils@1.0.0-beta.34