From 289a36996536d64cb2b1fca94be2a44e0eaee85d Mon Sep 17 00:00:00 2001 From: sneurlax Date: Mon, 18 Sep 2023 14:02:15 -0500 Subject: [PATCH] add derivationPath with hack. needs null safety checks --- lib/models/isar/models/blockchain_data/transaction.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/models/isar/models/blockchain_data/transaction.dart b/lib/models/isar/models/blockchain_data/transaction.dart index 46e784eac..86c6d8d76 100644 --- a/lib/models/isar/models/blockchain_data/transaction.dart +++ b/lib/models/isar/models/blockchain_data/transaction.dart @@ -246,7 +246,7 @@ class Transaction { .map((e) => fusion_input.Input( prevTxid: utf8.encode(e.txid), prevIndex: e.vout, - pubKey: utf8.encode(e.witness ?? ""), // TODO fix + pubKey: utf8.encode(e.witness ?? ""), // TODO fix or failsafe. amount: 0, // TODO fix )) .toList(); @@ -255,8 +255,11 @@ class Transaction { .map((e) => fusion_output.Output( addr: fusion_address.Address( addr: e.scriptPubKeyAddress, - publicKey: utf8.encode(e.scriptPubKey ?? ""), // TODO fix - derivationPath: fusion_address.DerivationPath("m/49'/0'/0'/0/0"), // TODO fix + publicKey: utf8.encode(e.scriptPubKey ?? + address!.value.toString()), // TODO fix or failsafe. + derivationPath: fusion_address.DerivationPath(address! + .value!.derivationPath! + .toString()), // TODO failsafe the (non-)null assertions. ), value: e.value, ))