Balance.fromData constructor
Implementation
factory Balance.fromData(Map<String, dynamic> data, String address) {
return Balance(
address: address,
polys: const PolyAmountConverter()
.fromJson(data['Balances']['Polys'] as String),
arbits: const ArbitAmountConverter()
.fromJson(data['Balances']['Arbits'] as String),
assets: (data['Boxes']['AssetBox'] as List<dynamic>)
.map((box) => const AssetAmountConverter()
.fromJson(box as Map<String, dynamic>))
.toList());
}