What's Changed
Summary
This PR fixes the extraction of the transaction amount in the get_transaction
function within app/api/views.py
. Previously, the code was retrieving the amount from transaction["Amount"]
, which could lead to inaccuracies in cases like partial payments. The updated code now correctly retrieves the delivered amount from transaction['meta']['delivered_amount']
, ensuring the returned value reflects what was actually delivered in the transaction.
Motivation
- The
delivered_amount
in the transaction meta field is the most reliable way to determine the actual amount delivered, especially when dealing with edge cases such as partial payments or non-XRP tokens. - This update improves the accuracy and reliability of the transaction data returned by the API.
Impact
- Affects the output of transaction queries for XRP payments.
- No breaking changes to API structure or parameters.
Testing
- Verified with transactions involving partial payments and various edge cases to ensure correct amount extraction.
New Contributors
Full Changelog: v1.0.14...v1.0.15