Browse Source

fix buffer

patch-2
Matias Alejo Garcia 11 years ago
parent
commit
ddd1476a39
  1. 4
      lib/Address.js

4
lib/Address.js

@ -119,7 +119,7 @@ Address.fromScriptPubKey = function(scriptPubKey, network) {
case Script.TX_MULTISIG:
version = networks[network].addressVersion;
for(var i in payload)
if(payload[i])
if(Buffer.isBuffer(payload[i]))
payload[i] = coinUtil.sha256ripe160(payload[i]);
break;
case Script.TX_SCRIPTHASH:
@ -127,7 +127,7 @@ Address.fromScriptPubKey = function(scriptPubKey, network) {
break;
}
for(var i in payload)
if(payload[i])
if(Buffer.isBuffer(payload[i]))
ret.push(new Address(version,payload[i]));
}
return ret;

Loading…
Cancel
Save