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

[ANCHOR-749] Add SEP-38 validation documentation #943

Conversation

lijamie98
Copy link
Contributor

*** Recreated due to operation mistake

Many validation rules are added to the response of the /rate endpoint. This PR adds the validations that may not be straight forward to the endpoint developers.

Copy link
Contributor

@philipliu philipliu left a comment

Choose a reason for hiding this comment

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

I think we need to run yarn api to generate the MDX files too.

If the validation fails, the Platform will respond to the client application's request with a HTTP status
code of `502 Bad Gateway`.

The `sell_mount`, `buy_amount`, `price`, and `fee` are validated as follows:
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: sell_amount

The `sell_mount`, `buy_amount`, `price`, and `fee` are validated as follows:

- if `rate.fee` exists,
- `rate.fee.asset` must be defined with proper `significant_decimals` in the asset configuration.
Copy link
Contributor

Choose a reason for hiding this comment

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

What does proper mean here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exists and positive.

@stellar-jenkins
Copy link

@stellar-jenkins
Copy link

@@ -718,7 +718,7 @@ Fetches a list of receivers within a specific disbursement using the disbursemen
required={false}
Copy link
Contributor

@philipliu philipliu Aug 26, 2024

Choose a reason for hiding this comment

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

We should remove the SDP changes.

@stellar-jenkins
Copy link

@stellar-jenkins
Copy link

1 similar comment
@stellar-jenkins
Copy link

@stellar-jenkins
Copy link

@lijamie98 lijamie98 merged commit 1377e24 into stellar:main Aug 27, 2024
2 checks passed
janewang pushed a commit that referenced this pull request Sep 12, 2024
* Add SEP-38 validation rules
---------

Co-authored-by: Elliot Voris <[email protected]>
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.

4 participants