cake_wallet/cw_nano/lib/nano_balance.dart

40 lines
1.1 KiB
Dart
Raw Normal View History

2023-07-24 16:56:20 +00:00
import 'package:cw_core/balance.dart';
import 'package:cw_core/currency.dart';
import 'package:cw_core/monero_amount_format.dart';
String rawToFormattedAmount(BigInt amount, Currency currency) {
return "";
}
2023-07-27 17:02:10 +00:00
BigInt stringAmountToBigInt(String amount) {
return BigInt.zero;
}
2023-07-24 16:56:20 +00:00
class NanoBalance extends Balance {
final BigInt currentBalance;
final BigInt receivableBalance;
late String formattedCurrentBalance;
late String formattedReceivableBalance;
2023-07-24 18:09:28 +00:00
NanoBalance({required this.currentBalance, required this.receivableBalance}) : super(0, 0) {
2023-07-24 16:56:20 +00:00
this.formattedCurrentBalance = "";
this.formattedReceivableBalance = "";
}
2023-07-27 17:02:10 +00:00
NanoBalance.fromString(
{required this.formattedCurrentBalance, required this.formattedReceivableBalance})
: currentBalance = stringAmountToBigInt(formattedCurrentBalance),
receivableBalance = stringAmountToBigInt(formattedReceivableBalance),
super(0, 0);
2023-07-24 18:09:28 +00:00
@override
2023-07-27 17:02:10 +00:00
String get formattedAvailableBalance {
return "0";
}
2023-07-24 18:09:28 +00:00
@override
2023-07-27 17:02:10 +00:00
String get formattedAdditionalBalance {
return "0";
}
2023-07-24 16:56:20 +00:00
}