findContracts method

  1. @override
Future<List> findContracts(
  1. List walletContracts
)

Implementation

@override
Future<List<brambl.WalletContract>> findContracts(
    List<brambl.WalletContract> walletContracts) async {
  try {
    final result = await walletContractsStore
        .records(walletContracts.map((c) => c.yIdx))
        .get(_instance);

    return result
        .map((json) => brambl.WalletContract(json!["yIdx"]! as int,
            json["name"]! as String, json["lockTemplate"]! as String))
        .toList();
  } catch (e) {
    rethrow;
  }
}