fix: migrate deprecated Morpho API fields#683
Conversation
Migrates deprecated Morpho API GraphQL fields/filters before the 2026-05-20 removal. Requested in Slack thread C0B3BFBE6AK / 1779090576.528369.
There was a problem hiding this comment.
💡 Codex Review
The liquidatable-position query still filters with marketUniqueKey_in even though the selected market ID was migrated. The generated schema already has the replacement marketId_in on MarketPositionFilters, so after the deprecated filter is removed, liquidation bots that pass marketIds will get a GraphQL validation error and stop retrieving liquidatable positions.
getMarketsAssets is still generated with the deprecated uniqueKey_in market filter, so the liquidation path can still fail once the API removes that filter even though the response field was aliased to marketId. This query runs in parallel with the liquidatable positions fetch and an API validation error here rejects the whole liquidation lookup; switch this filter to the current market-id filter and regenerate src/api/sdk.ts.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Add patch changeset entries for the liquidity and liquidation SDK GraphQL market identifier migration.
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
uniqueKey: marketId,whitelisted: listed) so existing runtime response shapes stay unchanged.VaultMetadata.curators->Vault.state.curators,MarketPosition.supplyAssets->MarketPosition.state.supplyAssets).Verification
whitelisted/promotedfilters remain in this repo.pnpm install --frozen-lockfile --ignore-scriptspnpm --filter @morpho-org/liquidity-sdk-viem buildpnpm --filter @morpho-org/liquidation-sdk-viem buildRequest Context
View Slack thread