Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SafeMultisigTransactionResponse dataDecoded field's type #1064

Open
juhasztibi opened this issue Dec 2, 2024 · 0 comments
Open

SafeMultisigTransactionResponse dataDecoded field's type #1064

juhasztibi opened this issue Dec 2, 2024 · 0 comments

Comments

@juhasztibi
Copy link

Description

Hi there,

I’ve recently started using the safe-sdk and came across what seems to be a type mismatch. When using the getMultisigTransactions method from SafeApiKit (imported from @safe-global/api-kit) on an instance of new SafeApiKit, the API returns structured data for the dataDecoded field. However, the SafeMultisigTransactionResponse type, which is the return type of the getMultisigTransactions method, defines dataDecoded as a string as seen here.

Could you confirm if this is expected behavior or if the type definition needs to be updated?

Thanks for your help!

What I do is very simple:

const getTransactionList = async () => {
    const safeApiClient = new SafeApiKit({ chainId }) // I put the instance creation here for simplicity of having the relevant line of codes
    const trxList = await safeApiClient.getMultisigTransactions(
      process.env.NEXT_PUBLIC_SAFE_WALLET_ADDRESS
    )
    
   return trxList
}

What it returns:

Screenshot 2024-12-02 at 18 59 32

Environment

  • Safe Core SDK versions:
    • api-kit: 2.5.4
    • protocol-kit: 5.0.4
    • relay-kit: 3.2.4
    • types-kit: 1.0.0
    • sdk-starter-kit:
  • Safe contract version: 1.4.1+L2
  • Environment:
    • browser: chrome

Expected result

The field of decodedData here respects the return type of the api field.

Additional context

I'm using the sdk in a nextjs project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant