transaction.addInput checks if sequence is NULL
This commit is contained in:
parent
fc690d418b
commit
044c53bcad
1 changed files with 4 additions and 1 deletions
|
@ -93,7 +93,10 @@ Transaction.fromHex = function(hex) {
|
||||||
* Note that this method does not sign the created input.
|
* Note that this method does not sign the created input.
|
||||||
*/
|
*/
|
||||||
Transaction.prototype.addInput = function(hash, index, sequence, script) {
|
Transaction.prototype.addInput = function(hash, index, sequence, script) {
|
||||||
if (sequence === undefined) sequence = Transaction.DEFAULT_SEQUENCE
|
if (sequence === undefined || sequence === null) {
|
||||||
|
sequence = Transaction.DEFAULT_SEQUENCE
|
||||||
|
}
|
||||||
|
|
||||||
script = script || Script.EMPTY
|
script = script || Script.EMPTY
|
||||||
|
|
||||||
if (typeof hash === 'string') {
|
if (typeof hash === 'string') {
|
||||||
|
|
Loading…
Add table
Reference in a new issue