decodeBoxes static method
Implementation
static List<TokenBox> decodeBoxes(List<dynamic> boxes) {
return boxes.map((box) {
switch (box['type']) {
case 'PolyBox':
return PolyBox.fromJson(box as Map<String, dynamic>);
case 'AssetBox':
return AssetBox.fromJson(box as Map<String, dynamic>);
case 'ArbitBox':
return ArbitBox.fromJson(box as Map<String, dynamic>);
default:
return TokenBox.fromJson(box as Map<String, dynamic>);
}
}).toList();
}