-
Notifications
You must be signed in to change notification settings - Fork 9
fix: pass integratorId to swap API #248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: pass integratorId to swap API #248
Conversation
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
🦋 Changeset detectedLatest commit: 6a91bb8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
| 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)); | ||
| } | ||
|
|
There was a problem hiding this comment.
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)) ?
There was a problem hiding this comment.
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.
closes ACP-5
problem
getSwapQuotedoes not accept theintegratorIDparam and thus does not pass it to the swap API.Work done
integratorIDas param and passes it to swap api to be appended to calldata.