Skip to content

Ambiguous deserialization in TransactionsAPI.estimateTransactionFee for SOL (Multiple oneOf matches) #125

Description

@Osc-ops-dev

This is in 14.0.0 version of the sdk:

When calling com.fireblocks.sdk.api.TransactionsAPI.estimateTransactionFee specifically for SOL, the SDK throws the following deserialization error:

"2 classes match result, expected 1"

The issue stems from the oneOf definition for FeeBreakdown. The ObjectMapper attempts to deserialize the payload against both FeeBreakdownOneOf and FeeBreakdownOneOf1. Since the response JSON structure for SOL satisfies the requirements of both subtypes, the deserializer cannot determine the unique target class.

Currently, we have only confirmed this behavior with SOL, but it is likely to affect any other asset whose fee structure aligns with both generated model definitions.

The models for FeeBreakdown need to be restructured to ensure they are mutually exclusive, or the discriminator logic needs to be refined:

com/fireblocks/sdk/model/FeeBreakdownOneOf.class
com/fireblocks/sdk/model/FeeBreakdownOneOf1.class

Thank you and regards,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions