Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Specify send_max when pathfinding with a source amount
When specifying a fixed sending amount during a pathfind request, the source amount is specified as a `send_max` field. This fixes a bug where the amount was specified as `source_amount`. Leading to strange pathfinding behavior. Example bad behavior (rippled pathfind request/response): ``` { "command": "ripple_path_find", "source_account": "rM21sWyMAJY1oqzgnweDatURxGMurBs7Kf", "destination_account": "raDjTrcEtyMqZT6s3PyKGcikUJqYNXUPPv", "destination_amount": { "currency": "EUR", "issuer": "raDjTrcEtyMqZT6s3PyKGcikUJqYNXUPPv", "value": -1 }, "source_amount": { "currency": "USD", "issuer": "rM21sWyMAJY1oqzgnweDatURxGMurBs7Kf", "value": "9.9" }, "id": 2 } { "id": 2, "result": { "alternatives": [ { "destination_amount": { "currency": "EUR", "issuer": "raDjTrcEtyMqZT6s3PyKGcikUJqYNXUPPv", "value": "147520.7583553951" }, "paths_canonical": [], "paths_computed": [ [ { "account": "r9HqF3wexBb1vtu2DfZKiFuyy3HoTAwUnH", "type": 1, "type_hex": "0000000000000001" }, { "currency": "EUR", "issuer": "raDjTrcEtyMqZT6s3PyKGcikUJqYNXUPPv", "type": 48, "type_hex": "0000000000000030" } ] ], "source_amount": { "currency": "USD", "issuer": "rM21sWyMAJY1oqzgnweDatURxGMurBs7Kf", "value": "160510.6025237665" } } ], "destination_account": "raDjTrcEtyMqZT6s3PyKGcikUJqYNXUPPv", "destination_currencies": [ "EUR", "XRP" ], "ledger_current_index": 2771044, "validated": false }, "status": "success", "type": "response" } ``` https://ripple.com/build/rippled-apis/#ripple-path-find
- Loading branch information