mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-07 03:19:31 +00:00
17 lines
694 B
Dart
17 lines
694 B
Dart
import 'package:cw_core/balance.dart';
|
|
import 'package:cw_zano/zano_formatter.dart';
|
|
|
|
class ZanoBalance extends Balance {
|
|
final int total;
|
|
final int unlocked;
|
|
final int decimalPoint;
|
|
ZanoBalance({required this.total, required this.unlocked, this.decimalPoint = ZanoFormatter.defaultDecimalPoint}) : super(unlocked, total - unlocked);
|
|
|
|
ZanoBalance.empty({this.decimalPoint = ZanoFormatter.defaultDecimalPoint}): total = 0, unlocked = 0, super(0, 0);
|
|
|
|
@override
|
|
String get formattedAdditionalBalance => ZanoFormatter.intAmountToString(total - unlocked, decimalPoint);
|
|
|
|
@override
|
|
String get formattedAvailableBalance => ZanoFormatter.intAmountToString(unlocked, decimalPoint);
|
|
}
|