Socket
Socket
Sign inDemoInstall

web3-core-method

Package Overview
Dependencies
Maintainers
1
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-core-method - npm Package Compare versions

Comparing version 1.0.0-beta.33 to 1.0.0-beta.34

10

package.json
{
"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];

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc