minor fixes

This commit is contained in:
Serhii 2023-03-27 12:34:10 +03:00
parent 4915df9fb7
commit d230b6a07b

View file

@ -6,11 +6,15 @@ class MoneroBalance extends Balance {
: formattedFullBalance = moneroAmountToString(amount: fullBalance), : formattedFullBalance = moneroAmountToString(amount: fullBalance),
formattedUnlockedBalance = formattedUnlockedBalance =
moneroAmountToString(amount: unlockedBalance), moneroAmountToString(amount: unlockedBalance),
formattedFrozen = '',
formattedTotalAvailable = '',
super(unlockedBalance, fullBalance); super(unlockedBalance, fullBalance);
MoneroBalance.fromString( MoneroBalance.fromString(
{required this.formattedFullBalance, {required this.formattedFullBalance,
required this.formattedUnlockedBalance}) required this.formattedUnlockedBalance,
required this.formattedFrozen,
required this.formattedTotalAvailable})
: fullBalance = moneroParseAmount(amount: formattedFullBalance), : fullBalance = moneroParseAmount(amount: formattedFullBalance),
unlockedBalance = moneroParseAmount(amount: formattedUnlockedBalance), unlockedBalance = moneroParseAmount(amount: formattedUnlockedBalance),
super(moneroParseAmount(amount: formattedUnlockedBalance), super(moneroParseAmount(amount: formattedUnlockedBalance),
@ -20,6 +24,8 @@ class MoneroBalance extends Balance {
final int unlockedBalance; final int unlockedBalance;
final String formattedFullBalance; final String formattedFullBalance;
final String formattedUnlockedBalance; final String formattedUnlockedBalance;
final String formattedFrozen;
final String formattedTotalAvailable;
@override @override
String get formattedAvailableBalance => formattedUnlockedBalance; String get formattedAvailableBalance => formattedUnlockedBalance;
@ -28,8 +34,8 @@ class MoneroBalance extends Balance {
String get formattedAdditionalBalance => formattedFullBalance; String get formattedAdditionalBalance => formattedFullBalance;
@override @override
String get formattedFrozenBalance => ''; String get formattedFrozenBalance => formattedFrozen;
@override @override
String get formattedTotalAvailableBalance => ''; String get formattedTotalAvailableBalance => formattedTotalAvailable;
} }