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

Fix NFT Amounts #451

Merged
merged 8 commits into from
Jul 14, 2023
Merged

Fix NFT Amounts #451

merged 8 commits into from
Jul 14, 2023

Conversation

nkramer44
Copy link
Collaborator

@nkramer44 nkramer44 commented Jul 14, 2023

Fixes #450

Some of the amount fields in NFT related objects were typed as XrpCurrencyAmounts, when they should have been CurrencyAmount. This was noticed because parsing transaction metadata with an AffectedNode for NFTokenOffer objects would throw an exception. This is because xrpl4j could not deserialize to a MetaNfTokenOfferObject because the amount field could not be deserialized correctly.

This PR changes the amount field in SellOffer, BuyOffer, NfTokenOfferObject and MetaNfTokenOfferObject from XrpCurrencyAmount to CurrencyAmount.

@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

Merging #451 (f91a30a) into main (1da875a) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main     #451   +/-   ##
=========================================
  Coverage     90.43%   90.43%           
  Complexity     1464     1464           
=========================================
  Files           285      285           
  Lines          4163     4163           
  Branches        339      339           
=========================================
  Hits           3765     3765           
  Misses          277      277           
  Partials        121      121           
Impacted Files Coverage Δ
...ava/org/xrpl/xrpl4j/model/client/nft/BuyOffer.java 100.00% <ø> (ø)
...va/org/xrpl/xrpl4j/model/client/nft/SellOffer.java 100.00% <ø> (ø)
...g/xrpl/xrpl4j/model/ledger/NfTokenOfferObject.java 100.00% <ø> (ø)

@sappenin sappenin merged commit 7823236 into main Jul 14, 2023
18 of 19 checks passed
@sappenin sappenin deleted the nk/fix-nft-amounts branch July 14, 2023 18:05
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.

sync data occur error when block has DeletNode
2 participants