mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-31 06:55:59 +00:00
Normal fee for non-mweb txns
This commit is contained in:
parent
c96424256e
commit
b1caf79c1b
2 changed files with 8 additions and 0 deletions
|
@ -1250,6 +1250,7 @@ abstract class ElectrumWalletBase
|
|||
totalConfirmed += confirmed;
|
||||
totalUnconfirmed += unconfirmed;
|
||||
|
||||
addressRecord.balance = confirmed + unconfirmed;
|
||||
if (confirmed > 0 || unconfirmed > 0) {
|
||||
addressRecord.setAsUsed();
|
||||
}
|
||||
|
|
|
@ -291,6 +291,13 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
|||
String? memo,
|
||||
required int feeRate}) async {
|
||||
|
||||
final spendsMweb = utxos.any((utxo) => utxo.utxo.scriptType == SegwitAddresType.mweb);
|
||||
final paysToMweb = outputs.any((output) =>
|
||||
output.toOutput.scriptPubKey.getAddressType() == SegwitAddresType.mweb);
|
||||
if (!spendsMweb && !paysToMweb) {
|
||||
return await super.calcFee(utxos: utxos, outputs: outputs,
|
||||
network: network, memo: memo, feeRate: feeRate);
|
||||
}
|
||||
final txb = BitcoinTransactionBuilder(utxos: utxos,
|
||||
outputs: outputs, fee: BigInt.zero, network: network);
|
||||
final scanSecret = mwebHd.derive(0x80000000).privKey!;
|
||||
|
|
Loading…
Reference in a new issue