2023-12-02 09:42:00 +00:00
|
|
|
import 'package:cw_zano/api/model/asset_info.dart';
|
|
|
|
|
|
|
|
class Balance {
|
|
|
|
final AssetInfo assetInfo;
|
|
|
|
final int awaitingIn;
|
|
|
|
final int awaitingOut;
|
|
|
|
final int total;
|
|
|
|
final int unlocked;
|
|
|
|
|
|
|
|
Balance(
|
|
|
|
{required this.assetInfo,
|
|
|
|
required this.awaitingIn,
|
|
|
|
required this.awaitingOut,
|
|
|
|
required this.total,
|
|
|
|
required this.unlocked});
|
|
|
|
|
|
|
|
factory Balance.fromJson(Map<String, dynamic> json) => Balance(
|
|
|
|
assetInfo:
|
2024-03-10 02:51:30 +00:00
|
|
|
AssetInfo.fromJson(json['asset_info'] as Map<String, dynamic>? ?? {}),
|
|
|
|
awaitingIn: json['awaiting_in'] as int? ?? 0,
|
|
|
|
awaitingOut: json['awaiting_out'] as int? ?? 0,
|
|
|
|
total: json['total'] as int? ?? 0,
|
|
|
|
unlocked: json['unlocked'] as int? ?? 0,
|
2023-12-02 09:42:00 +00:00
|
|
|
);
|
|
|
|
}
|