ripple/rippled — pull request #671 by nbougalis (2014-10-31 07:28:57+00:00)
Title: Add synthetic "delivered_amount" field to payment "meta" JSON (RIPD-643)

To reduce the need for clients to have logic that checks whether the `DeliveredAmount` field is specified and using it instead of `Amount` when processing payment transactions, we synthesize the new field `delivered_amount` which always contains the amount that was actually delivered. The field is part of the `meta` information returned with a Payment transaction, and is only present if `meta` is there.

The first commit changes only the logic. The second `[FOLD]` commit unindents the code with minimal logic changes (e.g. inverting an `if`).

Reviews: @JoelKatz, @rec