mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
CW-997 coin control enhancements / send ALL fixes (#2114)
* computed sending balance value * files that didnt get added before * monero + move unspent calc to view model * working * remove old code * Update lib/view_model/send/send_view_model.dart --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
parent
7831b421b1
commit
40a0989956
8 changed files with 106 additions and 12 deletions
|
@ -65,6 +65,6 @@ class ElectrumBalance extends Balance {
|
|||
'unconfirmed': unconfirmed,
|
||||
'frozen': frozen,
|
||||
'secondConfirmed': secondConfirmed,
|
||||
'secondUnconfirmed': secondUnconfirmed
|
||||
'secondUnconfirmed': secondUnconfirmed,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@ import 'dart:io';
|
|||
import 'dart:isolate';
|
||||
|
||||
import 'package:bitcoin_base/bitcoin_base.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_amount_format.dart';
|
||||
import 'package:cw_core/format_amount.dart';
|
||||
import 'package:cw_core/utils/print_verbose.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_wallet.dart';
|
||||
import 'package:cw_bitcoin/litecoin_wallet.dart';
|
||||
|
@ -2240,10 +2242,11 @@ abstract class ElectrumWalletBase
|
|||
|
||||
if (element.hash == info.hash &&
|
||||
element.vout == info.vout &&
|
||||
info.isFrozen &&
|
||||
element.bitcoinAddressRecord.address == info.address &&
|
||||
element.value == info.value) {
|
||||
totalFrozen += element.value;
|
||||
if (info.isFrozen) {
|
||||
totalFrozen += element.value;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -2499,6 +2502,12 @@ abstract class ElectrumWalletBase
|
|||
transactionHistory.addOne(tx);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
String formatCryptoAmount(String amount) {
|
||||
final amountInt = int.parse(amount);
|
||||
return bitcoinAmountToString(amount: amountInt);
|
||||
}
|
||||
}
|
||||
|
||||
class ScanNode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue