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

LedgerResult Deserialization: Negative TakerPays in Tx Metadata #473

Closed
nkramer44 opened this issue Aug 10, 2023 · 2 comments
Closed

LedgerResult Deserialization: Negative TakerPays in Tx Metadata #473

nkramer44 opened this issue Aug 10, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@nkramer44
Copy link
Collaborator

Some Offer transactions in historical ledgers have metadata where the TakerPays field is a negative number. MetaOfferObject.takerPays is typed as a CurrencyAmount, which for XRP amounts wraps an UnsignedInteger. We should figure out why in some cases the TakerPays field can be negative.

Ledgers where this is a problem:

  • 03C83A4DA96E1E55F8BE7617CDD405C5A967CE4DFE935602632DFEEF34B20021
  • E74BBAF2073EA15CA82C167FA5B9B40D74E5391C218E8473CBF90FEB9C6540DC
@sappenin
Copy link
Collaborator

sappenin commented Aug 10, 2023

One idea: We can add a boolean method (i.e., a flag) to XrpCurrencyAmount to indicate sign (e.g., isNegative). This should align with the STAmount binary encoding, which also uses a flag to indicate negativity.

sappenin added a commit that referenced this issue Aug 23, 2024
@sappenin sappenin self-assigned this Aug 23, 2024
@sappenin sappenin added the bug Something isn't working label Aug 23, 2024
@sappenin
Copy link
Collaborator

This is fixed via #535. Please upgrade to v3.5.0 or above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants