From a878b5a4b956ace0b5eaedd31c1d254cd7fcef92 Mon Sep 17 00:00:00 2001 From: dafuga Date: Mon, 4 Mar 2024 19:18:54 -0800 Subject: [PATCH] fix: returning empty array when Array is received in ABI --- Sources/EOSIO/ABIDecoder.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/EOSIO/ABIDecoder.swift b/Sources/EOSIO/ABIDecoder.swift index afac234..2df1652 100644 --- a/Sources/EOSIO/ABIDecoder.swift +++ b/Sources/EOSIO/ABIDecoder.swift @@ -108,6 +108,8 @@ public extension ABIDecoder { return Int(try self.readVarint()) as! T case is UInt.Type: return UInt(try self.readVaruint()) as! T + case is Array.Type: + return [] as! T case let abiType as ABIDecodable.Type: let decodedAbiType = try abiType.init(fromAbi: self)