From aa0147531693b45364cf66e1115bf340ed8c5aaf Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Tue, 4 Jun 2019 18:47:49 +0700 Subject: [PATCH] Add TODO to check the empty buffer behaviour --- ts_src/transaction_builder.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ts_src/transaction_builder.ts b/ts_src/transaction_builder.ts index e27cd11..2ab48ce 100644 --- a/ts_src/transaction_builder.ts +++ b/ts_src/transaction_builder.ts @@ -113,6 +113,9 @@ export class TransactionBuilder { const witnessElements = (decompile(finalScriptWitness) as []).map( chunk => { if (!chunk) { + // TODO: Check why/if this is needed. + // Do we really want to return instead of when `chunk` is 0/0x00/OP_0/OP_FALSE? + // Copied from https://github.com/bitcoinjs/bip174/blob/a00379750b41be799d822d060457a6580b7e41db/src/extract_transaction.js#L42 return Buffer.from([]); }