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.
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.
Some Offer transactions in historical ledgers have metadata where the
TakerPays
field is a negative number.MetaOfferObject.takerPays
is typed as aCurrencyAmount
, which for XRP amounts wraps anUnsignedInteger
. We should figure out why in some cases theTakerPays
field can be negative.Ledgers where this is a problem: