Skip to content

Commit

Permalink
client: fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrocheleau committed Apr 19, 2024
1 parent c78dfd0 commit 9089534
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/client/src/net/protocol/ethprotocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,12 @@ export class EthProtocol extends Protocol {
decode: (
params: Uint8Array[] | [types: PrefixedHexString, sizes: number[], hashes: Uint8Array[]]
) => {
return isNestedUint8Array(params) === true
? params
: [hexToBytes(params[0]), params[1].map((size) => BigInt(size)), params[2]]
if (isNestedUint8Array(params) === true) {
return params
} else {
const [types, sizes, hashes] = params as [PrefixedHexString, number[], Uint8Array[]]
return [hexToBytes(types), sizes.map((size) => BigInt(size)), hashes]
}
},
},
{
Expand Down

0 comments on commit 9089534

Please sign in to comment.