mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
spark transaction to spark send fixes
This commit is contained in:
parent
48ad3db84c
commit
42e18397d7
1 changed files with 20 additions and 16 deletions
|
@ -411,20 +411,6 @@ mixin SparkInterface on Bip39HDWallet, ElectrumXInterface {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tempInputs.add(
|
|
||||||
InputV2.isarCantDoRequiredInDefaultConstructor(
|
|
||||||
scriptSigHex: "d3",
|
|
||||||
sequence: 0xffffffff,
|
|
||||||
outpoint: null,
|
|
||||||
addresses: [],
|
|
||||||
valueStringSats: "0",
|
|
||||||
witness: null,
|
|
||||||
innerRedeemScriptAsm: null,
|
|
||||||
coinbase: null,
|
|
||||||
walletOwns: true,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
final extractedTx = txb.buildIncomplete();
|
final extractedTx = txb.buildIncomplete();
|
||||||
extractedTx.addInput(
|
extractedTx.addInput(
|
||||||
'0000000000000000000000000000000000000000000000000000000000000000'
|
'0000000000000000000000000000000000000000000000000000000000000000'
|
||||||
|
@ -485,6 +471,24 @@ mixin SparkInterface on Bip39HDWallet, ElectrumXInterface {
|
||||||
rawValue: BigInt.from(spend.fee),
|
rawValue: BigInt.from(spend.fee),
|
||||||
fractionDigits: cryptoCurrency.fractionDigits,
|
fractionDigits: cryptoCurrency.fractionDigits,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
tempInputs.add(
|
||||||
|
InputV2.isarCantDoRequiredInDefaultConstructor(
|
||||||
|
scriptSigHex: "d3",
|
||||||
|
sequence: 0xffffffff,
|
||||||
|
outpoint: null,
|
||||||
|
addresses: [],
|
||||||
|
valueStringSats: tempOutputs
|
||||||
|
.map((e) => e.value)
|
||||||
|
.fold(fee.raw, (p, e) => p + e)
|
||||||
|
.toString(),
|
||||||
|
witness: null,
|
||||||
|
innerRedeemScriptAsm: null,
|
||||||
|
coinbase: null,
|
||||||
|
walletOwns: true,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
return txData.copyWith(
|
return txData.copyWith(
|
||||||
raw: rawTxHex,
|
raw: rawTxHex,
|
||||||
vSize: extractedTx.virtualSize(),
|
vSize: extractedTx.virtualSize(),
|
||||||
|
|
Loading…
Reference in a new issue