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-810] Fix the rate response validation bug when there is no fee #1497

Merged

Conversation

lijamie98
Copy link
Collaborator

@lijamie98 lijamie98 commented Sep 9, 2024

Description

  • Fix the rate response validation bug when there is no fee
  • The withinRoundingError call was missing the ! operator when there is no fee in the rate response.

Context

Bub fix.

Testing

  • ./gradlew test

Documentation

N/A

Known limitations

N/A

Comment on lines -113 to -116
if (Objects.requireNonNull(rate).getFee() == null) {
logErrorAndThrow(
"'rate.fee' is missing in the GET /rate response", ServerErrorException.class);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to make the fee object optional?

Copy link
Contributor

Choose a reason for hiding this comment

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

Its required in the SEP-38 responses

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do we assume fee is necessary in a quote?

@lijamie98 lijamie98 force-pushed the feature/anchor-810-validation-bug branch from f71e317 to 94ecdc6 Compare September 9, 2024 23:00
Copy link
Contributor

@JakeUrban JakeUrban left a comment

Choose a reason for hiding this comment

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

LGTM!

@lijamie98 lijamie98 merged commit a02ded8 into stellar:develop Sep 10, 2024
8 checks passed
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.

2 participants