2020-06-01 18:13:56 +00:00
|
|
|
import 'package:flutter/foundation.dart';
|
2020-09-21 11:50:26 +00:00
|
|
|
import 'package:cake_wallet/monero/monero_amount_format.dart';
|
2020-06-01 18:13:56 +00:00
|
|
|
|
|
|
|
class MoneroBalance {
|
|
|
|
MoneroBalance({@required this.fullBalance, @required this.unlockedBalance})
|
|
|
|
: formattedFullBalance = moneroAmountToString(amount: fullBalance),
|
|
|
|
formattedUnlockedBalance =
|
|
|
|
moneroAmountToString(amount: unlockedBalance);
|
|
|
|
|
|
|
|
MoneroBalance.fromString(
|
|
|
|
{@required this.formattedFullBalance,
|
|
|
|
@required this.formattedUnlockedBalance})
|
|
|
|
: fullBalance = moneroParseAmount(amount: formattedFullBalance),
|
|
|
|
unlockedBalance = moneroParseAmount(amount: formattedUnlockedBalance);
|
|
|
|
|
|
|
|
final int fullBalance;
|
|
|
|
final int unlockedBalance;
|
|
|
|
final String formattedFullBalance;
|
|
|
|
final String formattedUnlockedBalance;
|
|
|
|
}
|