Skip to content

Commit

Permalink
Merge pull request #16 from greymass/fixing-cast-error
Browse files Browse the repository at this point in the history
Returning empty array when Array<Never> is received in ABI
  • Loading branch information
aaroncox authored Mar 5, 2024
2 parents 93864a0 + a878b5a commit fb5b20b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/EOSIO/ABIDecoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<Never>.Type:
return [] as! T
case let abiType as ABIDecodable.Type:
let decodedAbiType = try abiType.init(fromAbi: self)

Expand Down

0 comments on commit fb5b20b

Please sign in to comment.