walletUpgradesFromJson static method

List<WalletUpgrade> walletUpgradesFromJson(
  1. Iterable walletUpgrades
)

Implementation

static List<WalletUpgrade> walletUpgradesFromJson(
  Iterable<dynamic> walletUpgrades,
) =>
    List.from(walletUpgrades).fold<List<WalletUpgrade>>(
      [],
      (previousValue, action) {
        try {
          return [
            ...previousValue,
            WalletUpgrade.fromJson(action),
          ];
        } catch (e) {
          return previousValue;
        }
      },
    );