| 1 | import 'package:cw_zano/zano_formatter.dart'; |
| 2 | |
| 3 | class Receive { |
| 4 | final BigInt amount; |
| 5 | final String assetId; |
| 6 | final int index; |
| 7 | |
| 8 | Receive({required this.amount, required this.assetId, required this.index}); |
| 9 | |
| 10 | factory Receive.fromJson(Map<String, dynamic> json) => Receive( |
| 11 | amount: ZanoFormatter.bigIntFromDynamic(json['amount']), |
| 12 | assetId: json['asset_id'] as String? ?? '', |
| 13 | index: json['index'] as int? ?? 0, |
| 14 | ); |
| 15 | } |