cake_wallet/cw_zano/lib/api/model/subtransfer.dart

17 lines
489 B
Dart
Raw Normal View History

2024-08-07 12:32:47 +00:00
import 'package:cw_zano/zano_formatter.dart';
2023-12-02 09:42:00 +00:00
class Subtransfer {
2024-08-07 12:32:47 +00:00
final BigInt amount;
2023-12-02 09:42:00 +00:00
final String assetId;
final bool isIncome;
Subtransfer(
{required this.amount, required this.assetId, required this.isIncome});
factory Subtransfer.fromJson(Map<String, dynamic> json) => Subtransfer(
2024-08-07 12:32:47 +00:00
amount: ZanoFormatter.bigIntFromDynamic(json['amount']),
assetId: json['asset_id'] as String? ?? '',
isIncome: json['is_income'] as bool? ?? false,
2023-12-02 09:42:00 +00:00
);
}