From c0f9c38b2d4e487a4cc4d4720681d1723f06ab61 Mon Sep 17 00:00:00 2001 From: Rodolphe Marques Date: Wed, 19 Jul 2023 19:12:12 +0200 Subject: [PATCH] fix: resolve array of addresses - PreparedTopicFilter does not take into account arrays when resolving addresses --- src.ts/contract/contract.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src.ts/contract/contract.ts b/src.ts/contract/contract.ts index 86fab0bf98..d38e9cef3a 100644 --- a/src.ts/contract/contract.ts +++ b/src.ts/contract/contract.ts @@ -88,7 +88,12 @@ class PreparedTopicFilter implements DeferredTopicFilter { return param.walkAsync(args[index], (type, value) => { if (type === "address") { - return resolveAddress(value, resolver); + if (Array.isArray(value)) { + return value.map((v) => resolveAddress(v, resolver)); + } else { + return resolveAddress(value, resolver); + } + } return value; });