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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Stéphane Prohaszka <stephane.prohaszka@ledger.fr>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This value is required to craft on your side the Sell Payload, which will be returned by the callback. | ||
|
||
```js copy | ||
exchangeSDK.swap({ |
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.
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 |
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.
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`. |
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.
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") |
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.
we should document when the amount is expected in smallestDenomination and when it's in natural unit.
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.
maybe better naming of the vars : amountInSmallestDenomination / amountInUsualUnit ?
LIVE-9024