mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 20:09:23 +00:00
add derivationPath
with hack. needs null safety checks
This commit is contained in:
parent
ef43bc802d
commit
289a369965
1 changed files with 6 additions and 3 deletions
|
@ -246,7 +246,7 @@ class Transaction {
|
||||||
.map((e) => fusion_input.Input(
|
.map((e) => fusion_input.Input(
|
||||||
prevTxid: utf8.encode(e.txid),
|
prevTxid: utf8.encode(e.txid),
|
||||||
prevIndex: e.vout,
|
prevIndex: e.vout,
|
||||||
pubKey: utf8.encode(e.witness ?? ""), // TODO fix
|
pubKey: utf8.encode(e.witness ?? ""), // TODO fix or failsafe.
|
||||||
amount: 0, // TODO fix
|
amount: 0, // TODO fix
|
||||||
))
|
))
|
||||||
.toList();
|
.toList();
|
||||||
|
@ -255,8 +255,11 @@ class Transaction {
|
||||||
.map((e) => fusion_output.Output(
|
.map((e) => fusion_output.Output(
|
||||||
addr: fusion_address.Address(
|
addr: fusion_address.Address(
|
||||||
addr: e.scriptPubKeyAddress,
|
addr: e.scriptPubKeyAddress,
|
||||||
publicKey: utf8.encode(e.scriptPubKey ?? ""), // TODO fix
|
publicKey: utf8.encode(e.scriptPubKey ??
|
||||||
derivationPath: fusion_address.DerivationPath("m/49'/0'/0'/0/0"), // TODO fix
|
address!.value.toString()), // TODO fix or failsafe.
|
||||||
|
derivationPath: fusion_address.DerivationPath(address!
|
||||||
|
.value!.derivationPath!
|
||||||
|
.toString()), // TODO failsafe the (non-)null assertions.
|
||||||
),
|
),
|
||||||
value: e.value,
|
value: e.value,
|
||||||
))
|
))
|
||||||
|
|
Loading…
Reference in a new issue