mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 03:49:22 +00:00
afbf818ab5
TODO replace casting throughout ordinals DTOs with refactored validation
16 lines
554 B
Dart
16 lines
554 B
Dart
import 'package:stackwallet/dto/ordinals/inscription_link.dart';
|
|
|
|
class FeedResponse {
|
|
final List<InscriptionLink> inscriptions;
|
|
|
|
FeedResponse({required this.inscriptions});
|
|
|
|
factory FeedResponse.fromJson(Map<String, dynamic> json) {
|
|
final List<dynamic> inscriptionsJson = json['_links']['inscriptions'] as List<dynamic>;
|
|
final List<InscriptionLink> inscriptions = inscriptionsJson
|
|
.map((json) => InscriptionLink.fromJson(json as Map<String, dynamic>))
|
|
.toList();
|
|
|
|
return FeedResponse(inscriptions: inscriptions);
|
|
}
|
|
}
|