2023-12-02 09:42:00 +00:00
|
|
|
class Destination {
|
2024-03-08 10:50:34 +00:00
|
|
|
final int amount; // transfered as string
|
2023-12-02 09:42:00 +00:00
|
|
|
final String address;
|
|
|
|
final String assetId;
|
|
|
|
|
|
|
|
Destination(
|
|
|
|
{required this.amount, required this.address, required this.assetId});
|
|
|
|
|
|
|
|
factory Destination.fromJson(Map<String, dynamic> json) => Destination(
|
2024-03-08 10:50:34 +00:00
|
|
|
amount: int.parse(json['amount'] as String),
|
2023-12-02 09:42:00 +00:00
|
|
|
address: json['address'] as String,
|
|
|
|
assetId: json['asset_id'] as String,
|
|
|
|
);
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() => {
|
2024-03-08 10:50:34 +00:00
|
|
|
"amount": amount.toString(),
|
2023-12-02 09:42:00 +00:00
|
|
|
"address": address,
|
|
|
|
"asset_id": assetId,
|
|
|
|
};
|
|
|
|
}
|