Skip to content

Commit 013b23e

Browse files
7flashfrozeman
authored andcommitted
check blockHash (web3#1243)
1 parent de3d64a commit 013b23e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/web3/contract.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ var checkForContractAddress = function(contract, callback){
117117
} else {
118118

119119
contract._eth.getTransactionReceipt(contract.transactionHash, function(e, receipt){
120-
if(receipt && !callbackFired) {
120+
if(receipt && receipt.blockHash && !callbackFired) {
121121

122122
contract._eth.getCode(receipt.contractAddress, function(e, code){
123123
/*jshint maxcomplexity: 6 */
@@ -178,7 +178,7 @@ var ContractFactory = function (eth, abi) {
178178
*/
179179
this.new = function () {
180180
/*jshint maxcomplexity: 7 */
181-
181+
182182
var contract = new Contract(this.eth, this.abi);
183183

184184
// parse arguments

0 commit comments

Comments
 (0)