cake_wallet/cw_decred/lib/balance.dart
Wisdom Arerosuoghene 2b808ad50a cw_decred: add libdcrwallet dependency and link library for android, ios and macos (#1240)
* change cw_decred from package to plugin

* add libdcrwallet dependency and link library for android, ios and macos

* remove spvwallet, make some libdcrwallet fns async, light refactor

* libdcrwallet: use json payload returns

* use specific libwallet commit hash

* decred: fix Rename wallet.

---------

Co-authored-by: JoeGruff <joegruffins@gmail.com>
2024-12-26 14:12:12 +09:00

20 lines
578 B
Dart

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);
factory DecredBalance.zero() => DecredBalance(confirmed: 0, unconfirmed: 0);
final int confirmed;
final int unconfirmed;
@override
String get formattedAvailableBalance =>
decredAmountToString(amount: confirmed);
@override
String get formattedAdditionalBalance =>
decredAmountToString(amount: unconfirmed);
}