Skip to content

handle order undefined in getJitIx #15

@jordy25519

Description

@jordy25519

using TS sdkJitProxyClient.getJitIx to build transactions and encounter this error occasionally

/project/node_modules/@drift-labs/jit-proxy/lib/jitProxyClient.js:30
            writableSpotMarketIndexes: (0, sdk_1.isVariant)(order.marketType, 'spot')
                                                                  ^
TypeError: Cannot read properties of undefined (reading 'marketType')

seems like some race condition and the order is not found

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