diff --git a/index.js b/index.js index 8169ed1..fe3873b 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,4 @@ var Web3 = require('./lib/web3'); -var namereg = require('./lib/web3/namereg'); - -//Web3.prototype.eth.sendIBANTransaction = require('./lib/web3/transfer'); // dont override global variable if (typeof window !== 'undefined' && typeof window.web3 === 'undefined') { diff --git a/lib/web3.js b/lib/web3.js index fad779a..c9803e6 100644 --- a/lib/web3.js +++ b/lib/web3.js @@ -61,7 +61,7 @@ function Web3 (provider) { this._extend({ properties: properties() }); -}; +} Web3.prototype.setProvider = function (provider) { this._requestManager.setProvider(provider); diff --git a/lib/web3/contract.js b/lib/web3/contract.js index 32845a4..1042cb2 100644 --- a/lib/web3/contract.js +++ b/lib/web3/contract.js @@ -119,7 +119,7 @@ var checkForContractAddress = function(contract, callback){ contract._web3.eth.getTransactionReceipt(contract.transactionHash, function(e, receipt){ if(receipt && !callbackFired) { - web3.eth.getCode(receipt.contractAddress, function(e, code){ + contract._web3.eth.getCode(receipt.contractAddress, function(e, code){ /*jshint maxcomplexity: 5 */ if(callbackFired) diff --git a/lib/web3/transfer.js b/lib/web3/transfer.js index 24b3267..26a1d04 100644 --- a/lib/web3/transfer.js +++ b/lib/web3/transfer.js @@ -47,7 +47,7 @@ var transfer = function (web3, from, to, value, callback) { return deposit(web3, from, address, value, iban.client()); } - namereg.addr(iban.institution(), function (err, address) { + web3.eth.icapNamereg.addr(iban.institution(), function (err, address) { return deposit(web3, from, address, value, iban.client(), callback); });