Skip to content

Commit

Permalink
Fix ambiguous function decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
navFooh committed Sep 9, 2024
1 parent 1f4637d commit 9f3d51c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/filecoin-actor-utils/src/utils/return.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ export const describeFEVMTxReturn = (
const tx = iface.parseTransaction({ data })
if (!tx) throw new Error('Failed to parse transaction')

// Return null for empty ABI outputs
// Return empty object if no output
const { outputs } = tx.fragment
if (!outputs?.length) return emptyValue

// Decode return value
const returnHex = cborToHex(returnVal)
const result = iface.decodeFunctionResult(tx.name, returnHex)
const result = iface.decodeFunctionResult(tx.fragment, returnHex)

// Convert ABI outputs to descriptor
const dataType =
Expand Down

0 comments on commit 9f3d51c

Please sign in to comment.