Browse Source

fix .fromScriptPubKey parsing in some strange Txs

patch-2
Matias Alejo Garcia 11 years ago
parent
commit
691fec5342
  1. 142
      browser/bundle.js
  2. 2
      lib/Address.js

142
browser/bundle.js

File diff suppressed because one or more lines are too long

2
lib/Address.js

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

Loading…
Cancel
Save