2023-12-22 11:59:02 +00:00
|
|
|
import 'package:cw_decred/amount_format.dart';
|
|
|
|
import 'package:cw_core/balance.dart';
|
|
|
|
|
|
|
|
class DecredBalance extends Balance {
|
|
|
|
const DecredBalance({required this.confirmed, required this.unconfirmed})
|
|
|
|
: super(confirmed, unconfirmed);
|
|
|
|
|
2024-03-06 02:32:15 +00:00
|
|
|
factory DecredBalance.zero() => DecredBalance(confirmed: 0, unconfirmed: 0);
|
|
|
|
|
2023-12-22 11:59:02 +00:00
|
|
|
final int confirmed;
|
|
|
|
final int unconfirmed;
|
|
|
|
|
|
|
|
@override
|
|
|
|
String get formattedAvailableBalance =>
|
|
|
|
decredAmountToString(amount: confirmed);
|
|
|
|
|
|
|
|
@override
|
|
|
|
String get formattedAdditionalBalance =>
|
|
|
|
decredAmountToString(amount: unconfirmed);
|
|
|
|
}
|