mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-22 06:28:39 +02:00
fix custom rate issue (#1579)
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
@@ -378,9 +378,9 @@ abstract class TransactionDetailsViewModelBase with Store {
|
||||
sendViewModel.displayFeeRate(priority, sliderValue.round()),
|
||||
onSliderChanged: (double newValue) =>
|
||||
setNewFee(value: newValue, priority: transactionPriority!),
|
||||
onItemSelected: (dynamic item) {
|
||||
onItemSelected: (dynamic item, double sliderValue) {
|
||||
transactionPriority = item as TransactionPriority;
|
||||
return setNewFee(priority: transactionPriority!);
|
||||
return setNewFee(value: sliderValue, priority: transactionPriority!);
|
||||
}));
|
||||
|
||||
if (transactionInfo.inputAddresses != null) {
|
||||
@@ -427,7 +427,11 @@ abstract class TransactionDetailsViewModelBase with Store {
|
||||
|
||||
String setNewFee({double? value, required TransactionPriority priority}) {
|
||||
newFee = priority == bitcoin!.getBitcoinTransactionPriorityCustom() && value != null
|
||||
? bitcoin!.getEstimatedFeeWithFeeRate(wallet, value.round(), transactionInfo.amount)
|
||||
? bitcoin!.feeAmountWithFeeRate(
|
||||
wallet,
|
||||
value.round(),
|
||||
transactionInfo.inputAddresses?.length ?? 1,
|
||||
transactionInfo.outputAddresses?.length ?? 1)
|
||||
: bitcoin!.getFeeAmountForPriority(
|
||||
wallet,
|
||||
priority,
|
||||
|
||||
Reference in New Issue
Block a user