Rippled: AccountDelete transaction does not return delivered_amount (Version: [1.5.0])

Created on 9 May 2020  路  2Comments  路  Source: ripple/rippled

Issue Description

rippled does not return delivered_amount property for AccountDelete transactions. DeliveredAmount is present, but delivered_amount is not. As per xrpl.org documentation, delivered_amount is the property that will always be present for Payment transactions.

DeliveredAmount | Currency Amount | (May be omitted) For a partial payment, this field records the amount of currency actually delivered to the destination. To avoid errors when reading transactions, instead use the delivered_amount field, which is provided for all Payment transactions, partial or not.

This inconsistency may cause problems with software that's designed to credit user's accounts with the amount mentioned in delivered_amount when an account is deleted and reserves are recovered.

Steps to Reproduce

  1. Sample websocket request: https://xrpl.org/websocket-api-tool.html?server=wss%3A%2F%2Fs2.ripple.com%2F&req=%7B%22id%22%3A14%2C%22command%22%3A%22ledger%22%2C%22ledger_index%22%3A55320808%2C%22full%22%3Afalse%2C%22accounts%22%3Afalse%2C%22transactions%22%3Atrue%2C%22expand%22%3Atrue%2C%22owner_funds%22%3Afalse%7D

  2. Search for AccountDelete

  3. Scroll down to DeliveredAmount.
  4. delivered_amount is missing.

delivered_amount

Expected Result

delivered_amount must be present for Payment transactions.

Actual Result

delivered_amount is missing.

Environment

  1. Sample deleted account: rnwe9kEcneb8DaXWtDWxctz7AChk6CAYnD
  2. s2.ripple.com full history server
API Change Bug

Most helpful comment

Thanks for the report. The delivered_amount metadata field is synthetically inserted under some circumstances. For example, if you attempt to use the tx command, you will see delivered_amount appear: https://xrpl.org/websocket-api-tool.html?server=wss%3A%2F%2Fs2.ripple.com%2F&req=%7B%22id%22%3A1%2C%22command%22%3A%22tx%22%2C%22transaction%22%3A%22825843F30A168D0E95164ECACD5DFDA39D49A67A174CDD1CEC3B811E0281CAEC%22%2C%22binary%22%3Afalse%7D

I think the absence of the field in the ledger response is an oversight that needs to be corrected: the delivered_amount field should be returned whenever metadata for a transaction is reported. I will mark this as a bug and it should be fixed for 1.6.0.

All 2 comments

Thanks for the report. The delivered_amount metadata field is synthetically inserted under some circumstances. For example, if you attempt to use the tx command, you will see delivered_amount appear: https://xrpl.org/websocket-api-tool.html?server=wss%3A%2F%2Fs2.ripple.com%2F&req=%7B%22id%22%3A1%2C%22command%22%3A%22tx%22%2C%22transaction%22%3A%22825843F30A168D0E95164ECACD5DFDA39D49A67A174CDD1CEC3B811E0281CAEC%22%2C%22binary%22%3Afalse%7D

I think the absence of the field in the ledger response is an oversight that needs to be corrected: the delivered_amount field should be returned whenever metadata for a transaction is reported. I will mark this as a bug and it should be fixed for 1.6.0.

I'm supportive of this as well. Seems like the delivered_amount in the ledger command thing is closely related to #3431.

Was this page helpful?
0 / 5 - 0 ratings