Skip to content

Conversation

@gsteenkamp89
Copy link
Collaborator

closes ACP-5

problem

getSwapQuote does not accept the integratorID param and thus does not pass it to the swap API.

Work done

  1. getSwapQuote now accepts integratorID as param and passes it to swap api to be appended to calldata.
  2. Add test.

Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
@linear
Copy link

linear bot commented Sep 24, 2025

@changeset-bot
Copy link

changeset-bot bot commented Sep 24, 2025

🦋 Changeset detected

Latest commit: 6a91bb8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@across-protocol/app-sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
toolkit-example Ready Ready Preview Comment Sep 24, 2025 6:08pm

Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Comment on lines +27 to +36
const integratorIdSuffix = getIntegratorDataSuffix(integratorId);
const swapSuffix = SWAP_CALLDATA_MARKER;
// swap/approval first appends the integratorId, then the swap marker
const suffix = options.isSwap
? concat([integratorIdSuffix, swapSuffix])
: integratorIdSuffix;

return calldata.endsWith(suffix.slice(2));
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

is it safe to rather check calldata.includes(integratorIdSuffix.slice(2)) ?

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, both work but I think we can keep it as is since we use .concat on the swap marker after the integrator id as you mentioned.

@gsteenkamp89 gsteenkamp89 merged commit 28160c4 into master Sep 24, 2025
3 checks passed
@gsteenkamp89 gsteenkamp89 deleted the fix/gsteenkamp-append-integratorid-swap-calldata branch September 24, 2025 18:26
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.

3 participants