mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
coin control utxos fix
This commit is contained in:
parent
043545c758
commit
e6b5e847c3
6 changed files with 24 additions and 6 deletions
|
@ -1151,13 +1151,15 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
isSendAll = true;
|
||||
}
|
||||
|
||||
final bool coinControl = utxos != null;
|
||||
|
||||
final txData = await coinSelection(
|
||||
satoshiAmountToSend: satoshiAmount,
|
||||
selectedTxFeeRate: rate,
|
||||
recipientAddress: address,
|
||||
isSendAll: isSendAll,
|
||||
utxos: utxos?.toList(),
|
||||
coinControl: utxos is List<isar_models.UTXO>,
|
||||
coinControl: coinControl,
|
||||
);
|
||||
|
||||
Logging.instance.log("prepare send: $txData", level: LogLevel.Info);
|
||||
|
@ -2360,6 +2362,7 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
} else {
|
||||
satoshisBeingUsed = spendableSatoshiValue;
|
||||
utxoObjectsToUse = spendableOutputs;
|
||||
inputsBeingConsumed = spendableOutputs.length;
|
||||
}
|
||||
|
||||
Logging.instance
|
||||
|
|
|
@ -1081,13 +1081,15 @@ class BitcoinCashWallet extends CoinServiceAPI
|
|||
isSendAll = true;
|
||||
}
|
||||
|
||||
final bool coinControl = utxos != null;
|
||||
|
||||
final result = await coinSelection(
|
||||
satoshiAmountToSend: satoshiAmount,
|
||||
selectedTxFeeRate: rate,
|
||||
recipientAddress: address,
|
||||
isSendAll: isSendAll,
|
||||
utxos: utxos?.toList(),
|
||||
coinControl: utxos is List<isar_models.UTXO>,
|
||||
coinControl: coinControl,
|
||||
);
|
||||
|
||||
Logging.instance
|
||||
|
@ -2426,6 +2428,7 @@ class BitcoinCashWallet extends CoinServiceAPI
|
|||
} else {
|
||||
satoshisBeingUsed = spendableSatoshiValue;
|
||||
utxoObjectsToUse = spendableOutputs;
|
||||
inputsBeingConsumed = spendableOutputs.length;
|
||||
}
|
||||
|
||||
Logging.instance
|
||||
|
|
|
@ -946,13 +946,15 @@ class DogecoinWallet extends CoinServiceAPI
|
|||
isSendAll = true;
|
||||
}
|
||||
|
||||
final bool coinControl = utxos != null;
|
||||
|
||||
final result = await coinSelection(
|
||||
satoshiAmountToSend: satoshiAmount,
|
||||
selectedTxFeeRate: rate,
|
||||
recipientAddress: address,
|
||||
isSendAll: isSendAll,
|
||||
utxos: utxos?.toList(),
|
||||
coinControl: utxos is List<isar_models.UTXO>,
|
||||
coinControl: coinControl,
|
||||
);
|
||||
|
||||
Logging.instance
|
||||
|
@ -2126,6 +2128,7 @@ class DogecoinWallet extends CoinServiceAPI
|
|||
} else {
|
||||
satoshisBeingUsed = spendableSatoshiValue;
|
||||
utxoObjectsToUse = spendableOutputs;
|
||||
inputsBeingConsumed = spendableOutputs.length;
|
||||
}
|
||||
|
||||
Logging.instance
|
||||
|
|
|
@ -1058,13 +1058,15 @@ class LitecoinWallet extends CoinServiceAPI
|
|||
isSendAll = true;
|
||||
}
|
||||
|
||||
final bool coinControl = utxos != null;
|
||||
|
||||
final txData = await coinSelection(
|
||||
satoshiAmountToSend: satoshiAmount,
|
||||
selectedTxFeeRate: rate,
|
||||
recipientAddress: address,
|
||||
isSendAll: isSendAll,
|
||||
utxos: utxos?.toList(),
|
||||
coinControl: utxos is List<isar_models.UTXO>,
|
||||
coinControl: coinControl,
|
||||
);
|
||||
|
||||
Logging.instance.log("prepare send: $txData", level: LogLevel.Info);
|
||||
|
@ -2314,6 +2316,7 @@ class LitecoinWallet extends CoinServiceAPI
|
|||
} else {
|
||||
satoshisBeingUsed = spendableSatoshiValue;
|
||||
utxoObjectsToUse = spendableOutputs;
|
||||
inputsBeingConsumed = spendableOutputs.length;
|
||||
}
|
||||
|
||||
Logging.instance
|
||||
|
|
|
@ -1049,13 +1049,15 @@ class NamecoinWallet extends CoinServiceAPI
|
|||
isSendAll = true;
|
||||
}
|
||||
|
||||
final bool coinControl = utxos != null;
|
||||
|
||||
final txData = await coinSelection(
|
||||
satoshiAmountToSend: satoshiAmount,
|
||||
selectedTxFeeRate: rate,
|
||||
recipientAddress: address,
|
||||
isSendAll: isSendAll,
|
||||
utxos: utxos?.toList(),
|
||||
coinControl: utxos is List<isar_models.UTXO>,
|
||||
coinControl: coinControl,
|
||||
);
|
||||
|
||||
Logging.instance.log("prepare send: $txData", level: LogLevel.Info);
|
||||
|
@ -2307,6 +2309,7 @@ class NamecoinWallet extends CoinServiceAPI
|
|||
} else {
|
||||
satoshisBeingUsed = spendableSatoshiValue;
|
||||
utxoObjectsToUse = spendableOutputs;
|
||||
inputsBeingConsumed = spendableOutputs.length;
|
||||
}
|
||||
|
||||
Logging.instance
|
||||
|
|
|
@ -976,13 +976,15 @@ class ParticlWallet extends CoinServiceAPI
|
|||
isSendAll = true;
|
||||
}
|
||||
|
||||
final bool coinControl = utxos != null;
|
||||
|
||||
final txData = await coinSelection(
|
||||
satoshiAmountToSend: satoshiAmount,
|
||||
selectedTxFeeRate: rate,
|
||||
recipientAddress: address,
|
||||
isSendAll: isSendAll,
|
||||
utxos: utxos?.toList(),
|
||||
coinControl: utxos is List<isar_models.UTXO>,
|
||||
coinControl: coinControl,
|
||||
);
|
||||
|
||||
Logging.instance.log("prepare send: $txData", level: LogLevel.Info);
|
||||
|
@ -2468,6 +2470,7 @@ class ParticlWallet extends CoinServiceAPI
|
|||
} else {
|
||||
satoshisBeingUsed = spendableSatoshiValue;
|
||||
utxoObjectsToUse = spendableOutputs;
|
||||
inputsBeingConsumed = spendableOutputs.length;
|
||||
}
|
||||
|
||||
Logging.instance
|
||||
|
|
Loading…
Reference in a new issue