diff --git a/lib/bcoin/tx.js b/lib/bcoin/tx.js index 02a67015..ef40b2fa 100644 --- a/lib/bcoin/tx.js +++ b/lib/bcoin/tx.js @@ -127,7 +127,7 @@ TX.prototype.signature = function(input, key, type) { type = 'all'; if (typeof type === 'string') - type = bcoin.protocol.constants.hashType[type]; + type = constants.hashType[type]; // Get the previous output's subscript var s = input.out.tx.getSubscript(input.out.index); @@ -203,7 +203,7 @@ TX.prototype.signInput = function(input, key, type) { type = 'all'; if (typeof type === 'string') - type = bcoin.protocol.constants.hashType[type]; + type = constants.hashType[type]; // Get the previous output's subscript var s = input.out.tx.getSubscript(input.out.index); @@ -412,7 +412,7 @@ TX.prototype.subscriptHash = function subscriptHash(index, s, type) { var copy = this.clone(); if (typeof type === 'string') - type = bcoin.protocol.constants.hashType[type]; + type = constants.hashType[type]; copy.inputs.forEach(function(input, i) { input.script = index === i ? s : [];