Browse Source

Fixed address object creation bug

hk-custom-address
vub 11 years ago
parent
commit
b41a4ecb91
  1. 4
      bitcoinjs-min.js
  2. 2
      src/address.js
  3. 2
      src/script.js

4
bitcoinjs-min.js

File diff suppressed because one or more lines are too long

2
src/address.js

@ -14,7 +14,7 @@ var p2sh_types = {
var Address = function (bytes) {
if (typeof bytes === 'string') {
this.hash = base58.decode(bytes);
this.hash = base58.checkDecode(bytes);
this.version = this.hash.version;
}
else {

2
src/script.js

@ -312,7 +312,7 @@ Script.createOutputScript = function (address)
{
var script = new Script();
// Standard pay-to-pubkey-hash
if (address.version == 0) {
if (!address.version) {
script.writeOp(Opcode.map.OP_DUP);
script.writeOp(Opcode.map.OP_HASH160);
script.writeBytes(address.hash);

Loading…
Cancel
Save