-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add DeliverMax (alias for Amount) in Payment transactions #4733
Add DeliverMax (alias for Amount) in Payment transactions #4733
Conversation
b7f9bc1
to
f7355e3
Compare
836dd87
to
1cbc61e
Compare
1cbc61e
to
4b3c895
Compare
Scope of the change.I want to:
|
dd9a258
to
c4f997a
Compare
I realised the old version of this draft was updating |
c4f997a
to
4d9a594
Compare
Also found that I missed proposed transactions and proposed account transaction, this is fixed now. I am considering some refactoring of my changes in |
1e0a5f3
to
17e39bb
Compare
Note, as seen in |
a738132
to
cf0798a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of minor things.
BTW, please stop force pushing. I'd rather have 20 tweak commits than have to figure out what changed since the last time I looked.
1cb93ec
to
5e7fa7c
Compare
@ximinez thanks for very generous input - I addressed all your comments. I added one more test to 'MultivarJson_test.cpp` which required an extra line for levelization, but I think that should be OK. |
static_assert( | ||
apiVersionSelector(RPC::apiBetaVersion)() + 1 // | ||
== MultiApiJson::size); | ||
for (unsigned apiVersion = RPC::apiMinimumSupportedVersion, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the intentions of looping over the apiVersions from minimumSupported
to beta
. I actually made a helper function long time back - may/ may not be useful :) [Now I feel, that the helper can be improved and is too strict. But I'll leave as it is.]
#4611
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That function is cool, but as written, it's only for tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh shoot, my bad - sorry about that. I did not notice this was not for tests 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries
@@ -135,6 +135,7 @@ test.csf > ripple.protocol | |||
test.csf > test.jtx | |||
test.json > ripple.beast | |||
test.json > ripple.json | |||
test.json > ripple.rpc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding lines to the ordering file is great, as long as it follows the existing rules (which this does). It would be a problem if the line was added to loops.txt
, or if the dependency didn't "fit" the existing order.
Suggested commit message:
|
This is ready for merge |
Is "Amount" removed from output on Payment transactions? |
Only in API v2. |
…F#4733) Using the "Amount" field in Payment transactions can cause incorrect interpretation. There continue to be problems from the use of this field. "Amount" is rarely the correct field to use; instead, "delivered_amount" (or "DeliveredAmount") should be used. Rename the "Amount" field to "DeliverMax", a less misleading name. With api_version: 2, remove the "Amount" field from Payment transactions. - Input: "DeliverMax" in `tx_json` is an alias for "Amount" - sign - submit (in sign-and-submit mode) - submit_multisigned - sign_for - Output: Add "DeliverMax" where transactions are provided by the API - ledger - tx - tx_history - account_tx - transaction_entry - subscribe (transactions stream) - Output: Remove "Amount" from API version 2 Fix XRPLF#3484 Fix XRPLF#3902
Add
DeliverMax
alias toAmount
, removeAmount
from API ver 2.Context of Change
Resolve #3484
Type of Change