From 808927a0d14a98b9dca569a425194e72b1ae1e85 Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 1 May 2023 08:51:55 -0600 Subject: [PATCH] handle change in abi data --- lib/utilities/extensions/impl/contract_abi.dart | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/utilities/extensions/impl/contract_abi.dart b/lib/utilities/extensions/impl/contract_abi.dart index c5a2877d8..eae0f2da4 100644 --- a/lib/utilities/extensions/impl/contract_abi.dart +++ b/lib/utilities/extensions/impl/contract_abi.dart @@ -20,13 +20,15 @@ extension ContractAbiExtensions on ContractAbi { final anonymous = json["anonymous"] as bool? ?? false; final List> components = []; - for (final input in json["inputs"] as List) { - components.add( - EventComponent( - _parseParam(input as Map), - input['indexed'] as bool? ?? false, - ), - ); + if (json["inputs"] is List) { + for (final input in json["inputs"] as List) { + components.add( + EventComponent( + _parseParam(input as Map), + input['indexed'] as bool? ?? false, + ), + ); + } } events.add(ContractEvent(anonymous, name, components));