Skip to content

Commit 3d12b74

Browse files
committed
inputs
1 parent 9f35d00 commit 3d12b74

File tree

2 files changed

+7
-178
lines changed

2 files changed

+7
-178
lines changed

lib/src/models/input.dart

Lines changed: 0 additions & 170 deletions
This file was deleted.

lib/src/models/transaction.dart

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,14 @@ class Transaction {
5353
throw FusionError("bad component prevout");
5454
}
5555

56-
// TODO fix input.
5756
final input = bitbox.Input(
58-
/*
59-
prevTxid: inp.prevTxid, // Make sure the types are matching
60-
prevIndex: inp.prevIndex,
61-
pubKey: inp.pubkey,
62-
value: inp.amount.toHexString().toBigIntFromHex.toInt(),
63-
*/
64-
);
57+
hash: Uint8List.fromList(inp.prevTxid),
58+
index: inp.prevIndex,
59+
sequence: 0xffffffff,
60+
pubkeys: [Uint8List.fromList(inp.pubkey)],
61+
value: inp.amount.toInt(),
62+
);
63+
6564
tx.inputs.add(input);
6665
inputIndices.add(i);
6766
} else if (comp.hasOutput()) {

0 commit comments

Comments
 (0)