Browse Source

reverse changes in address

patch-2
Matias Alejo Garcia 11 years ago
parent
commit
56e7739a46
  1. 6
      lib/Address.js

6
lib/Address.js

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

Loading…
Cancel
Save