mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
Fixed balance dispaying. Changed updating of balance after sending. Changed text for pre seed screen for btc wallet type.
This commit is contained in:
@@ -27,7 +27,8 @@ class BitcoinBalance extends Balance {
|
||||
final int confirmed;
|
||||
final int unconfirmed;
|
||||
|
||||
int get total => confirmed + unconfirmed;
|
||||
int get total =>
|
||||
confirmed + (unconfirmed < 0 ? unconfirmed * -1 : unconfirmed);
|
||||
|
||||
int get availableBalance => confirmed + (unconfirmed < 0 ? unconfirmed : 0);
|
||||
|
||||
|
||||
@@ -319,7 +319,10 @@ abstract class BitcoinWalletBase extends WalletBase<BitcoinBalance> with Store {
|
||||
|
||||
return PendingBitcoinTransaction(txb.build(),
|
||||
eclient: eclient, amount: amount, fee: fee)
|
||||
..addListener((transaction) => transactionHistory.addOne(transaction));
|
||||
..addListener((transaction) async {
|
||||
transactionHistory.addOne(transaction);
|
||||
await _updateBalance();
|
||||
});
|
||||
}
|
||||
|
||||
String toJSON() => json.encode({
|
||||
|
||||
Reference in New Issue
Block a user