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

16 lines
447 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 Receive {
2024-08-07 12:32:47 +00:00
final BigInt amount;
2023-12-02 09:42:00 +00:00
final String assetId;
final int index;
Receive({required this.amount, required this.assetId, required this.index});
factory Receive.fromJson(Map<String, dynamic> json) => Receive(
2024-08-07 12:32:47 +00:00
amount: ZanoFormatter.bigIntFromDynamic(json['amount']),
assetId: json['asset_id'] as String? ?? '',
index: json['index'] as int? ?? 0,
2023-12-02 09:42:00 +00:00
);
}