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']),
|
2024-03-10 02:51:30 +00:00
|
|
|
assetId: json['asset_id'] as String? ?? '',
|
|
|
|
isIncome: json['is_income'] as bool? ?? false,
|
2023-12-02 09:42:00 +00:00
|
|
|
);
|
|
|
|
}
|