Skip to content
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

Update SELL info considering ExchangeSDK release #178

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sprohaszka-ledger
Copy link
Collaborator

@sprohaszka-ledger sprohaszka-ledger commented Apr 18, 2024

Signed-off-by: Stéphane Prohaszka <stephane.prohaszka@ledger.fr>
Copy link

vercel bot commented Apr 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
developer-portal-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2024 1:19pm

This value is required to craft on your side the Sell Payload, which will be returned by the callback.

```js copy
exchangeSDK.swap({
Copy link
Contributor

Choose a reason for hiding this comment

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

exchangeSDK.sell maybe ?


* `quoteId`: the id coming from your system and [forwarded to your LiveApp](./providers-liveapp) as a query parameter
* `accountId`: user's account id, [previously given to the LiveApp](./providers-liveapp) as a query parameter
* `amount`: amount that will be sell
Copy link
Contributor

Choose a reason for hiding this comment

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

that will be sold

* `quoteId`: the id coming from your system and [forwarded to your LiveApp](./providers-liveapp) as a query parameter
* `accountId`: user's account id, [previously given to the LiveApp](./providers-liveapp) as a query parameter
* `amount`: amount that will be sell
* `feeStrategy`: `SLOW`, `MEDIUM`, `FAST` or `CUSTOM`.
Copy link
Contributor

Choose a reason for hiding this comment

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

how do you handle custom if no other param ?
we should re-discuss how to handle fees definition.
For swap with moonpay, the Custom is quite broken :/

// Crafting Payload...
return {
recipientAddress: "0xc0ffee254729296a45a3885639AC7E10F9d54979"
amount: BigInt("800000000000000000")
Copy link
Contributor

Choose a reason for hiding this comment

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

we should document when the amount is expected in smallestDenomination and when it's in natural unit.

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe better naming of the vars : amountInSmallestDenomination / amountInUsualUnit ?

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.

None yet

3 participants