web3-core-method
Advanced tools
Comparing version 1.0.0-beta.20 to 1.0.0-beta.21
{ | ||
"name": "web3-core-method", | ||
"version": "1.0.0-beta.20", | ||
"namespace": "ethereum", | ||
"version": "1.0.0-beta.21", | ||
"description": "Creates the methods on the web3 modules. This is an internal package.", | ||
@@ -10,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.20", | ||
"web3-core-promievent": "^1.0.0-beta.17", | ||
"web3-core-subscriptions": "^1.0.0-beta.20", | ||
"web3-utils": "^1.0.0-beta.20" | ||
"web3-core-helpers": "^1.0.0-beta.21", | ||
"web3-core-promievent": "^1.0.0-beta.21", | ||
"web3-core-subscriptions": "^1.0.0-beta.21", | ||
"web3-utils": "^1.0.0-beta.21" | ||
} | ||
} |
@@ -257,3 +257,3 @@ /* | ||
if (!receipt) { | ||
if (!receipt || !receipt.blockHash) { | ||
throw new Error('Receipt is "null"'); | ||
@@ -394,16 +394,18 @@ } | ||
.then(function(receipt) { | ||
if (receipt && receipt.blockNumber) { | ||
checkConfirmation(null, null, null, receipt); | ||
if (receipt && receipt.blockHash) { | ||
if (defer.eventEmitter.listeners('confirmation').length > 0) { | ||
// if the promise has not been resolved we must keep on watching for new Blocks, if a confrimation listener is present | ||
setTimeout(function(){ | ||
// if the promised has not been resolved we must keep on watching for new Blocks | ||
if (!promiseResolved) startWatching(); | ||
} ,1000); | ||
}, 1000); | ||
} | ||
} | ||
else { | ||
return checkConfirmation(null, null, null, receipt); | ||
} else if (!promiseResolved) { | ||
startWatching(); | ||
} | ||
}) | ||
.catch(startWatching); | ||
.catch(function(){ | ||
if (!promiseResolved) startWatching(); | ||
}); | ||
@@ -445,4 +447,12 @@ }; | ||
var sendTxCallback = function (err, result) { | ||
result = method.formatOutput(result); | ||
try { | ||
result = method.formatOutput(result); | ||
} catch(e) { | ||
err = e; | ||
} | ||
if (result instanceof Error) { | ||
err = result; | ||
} | ||
if (!err) { | ||
@@ -449,0 +459,0 @@ if (payload.callback) { |
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
20373
466