Skip to content

feat: add PositionSwapSetCollateralApproval for V4 adapter refactor#344

Merged
mgrabina merged 8 commits intomainfrom
feat/v4-adapter-set-collateral-approval
Apr 2, 2026
Merged

feat: add PositionSwapSetCollateralApproval for V4 adapter refactor#344
mgrabina merged 8 commits intomainfrom
feat/v4-adapter-set-collateral-approval

Conversation

@mgrabina
Copy link
Copy Markdown
Contributor

Summary

  • Adds support for the new PositionSwapSetCollateralApproval type from the backend V4 adapter refactor
  • Handles the new approval in both signApprovals (spec) and processApprovals (react) helpers
  • Regenerated schema from local backend with new types

Schema changes (non-breaking)

Output - PositionSwapApproval union:

  • New variant PositionSwapSetCollateralApproval with bySignature: SwapTypedData

Input - PreparePositionSwapRequest:

  • New optional field setCollateralSignature: Signature

Related

  • Backend PR: aave/aave-backend-monorepo#546
  • Contracts PR: aave/cow-swap-adapters#54

Adds support for the new SetUsingAsCollateral approval type from the
backend V4 adapter refactor. This is returned conditionally when a
collateral swap targets an asset not yet enabled as collateral.

Schema changes (non-breaking):
- New union variant PositionSwapSetCollateralApproval on PositionSwapApproval
- New optional field setCollateralSignature on PreparePositionSwapRequest
@mgrabina mgrabina requested a review from juangm March 31, 2026 18:55
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6332f9574a

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mgrabina mgrabina merged commit f064787 into main Apr 2, 2026
7 checks passed
@mgrabina mgrabina deleted the feat/v4-adapter-set-collateral-approval branch April 2, 2026 14:27
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

Successfully merging this pull request may close these issues.

2 participants