@@ -49,8 +49,8 @@ Transaction.prototype.addInput = function(tx, index, sequence) {
49
49
50
50
assert ( Buffer . isBuffer ( hash ) , 'Expected Transaction, txId or txHash, got ' + tx )
51
51
assert . equal ( hash . length , 32 , 'Expected hash length of 32, got ' + hash . length )
52
- assert . equal ( typeof index , 'number' , 'Expected number index, got ' + index )
53
- assert . equal ( typeof sequence , 'number' , 'Expected number sequence, got ' + sequence )
52
+ assert ( Number . isFinite ( index ) , 'Expected number index, got ' + index )
53
+ assert ( Number . isFinite ( sequence ) , 'Expected number sequence, got ' + sequence )
54
54
55
55
// Add the input and return the input's index
56
56
return ( this . ins . push ( {
@@ -82,7 +82,7 @@ Transaction.prototype.addOutput = function(scriptPubKey, value) {
82
82
}
83
83
84
84
assert ( scriptPubKey instanceof Script , 'Expected Address or Script, got ' + scriptPubKey )
85
- assert . equal ( typeof value , 'number' , 'Expected number value, got ' + value )
85
+ assert ( Number . isFinite ( value ) , 'Expected number value, got ' + value )
86
86
87
87
// Add the output and return the output's index
88
88
return ( this . outs . push ( {
0 commit comments