Skip to content

Commit

Permalink
SEP-24: Make amount_out optional in transaction responses (#1520)
Browse files Browse the repository at this point in the history
* Make amount_out optional

* Bump version

* Update field description

* Update `amount_out` description

Co-authored-by: Jake Urban <[email protected]>

* Prettify

---------

Co-authored-by: Jake Urban <[email protected]>
  • Loading branch information
philipliu and JakeUrban committed Aug 14, 2024
1 parent 2128e4e commit 44672f5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ecosystem/sep-0024.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Title: Hosted Deposit and Withdrawal
Author: SDF
Status: Active
Created: 2019-09-18
Updated: 2024-05-07
Version 3.7.0
Updated: 2024-08-07
Version 3.7.1
```

## Simple Summary
Expand Down Expand Up @@ -1077,7 +1077,7 @@ Each object in the `transactions` array should have the following fields:
| `more_info_url` | string | A URL that is opened by wallets after the interactive flow is complete. It can include banking information for users to start deposits, the status of the transaction, or any other information the user might need to know about the transaction. |
| `amount_in` | string | Amount received by anchor at start of transaction as a string with up to 7 decimals. Excludes any fees charged before the anchor received the funds. |
| `amount_in_asset` | string | (optional) The asset received or to be received by the Anchor. Must be present if the deposit/withdraw was made using non-equivalent assets. The value must be in [SEP-38 Asset Identification Format](sep-0038.md#asset-identification-format). See the [Asset Exchanges](#asset-exchanges) section for more information. |
| `amount_out` | string | Amount sent by anchor to user at end of transaction as a string with up to 7 decimals. Excludes amount converted to XLM to fund account and any external fees. |
| `amount_out` | string | (optional) Amount sent by anchor to user at end of transaction as a string with up to 7 decimals. Excludes amount converted to XLM to fund account and any external fees. This field should be set as soon as the anchor can calculate it using `amount_in`, the exchange rate between `amount_in_asset` and `amount_out_asset`, and `fee.total`. |
| `amount_out_asset` | string | (optional) The asset delivered or to be delivered to the user. Must be present if the deposit/withdraw was made using non-equivalent assets. The value must be in [SEP-38 Asset Identification Format](sep-0038.md#asset-identification-format). See the [Asset Exchanges](#asset-exchanges) section for more information. |
| `amount_fee` | string | (**deprecated**) Amount of fee charged by anchor. This field is deprecated in favor of the `fee_details` field. |
| `amount_fee_asset` | string | (**deprecated**, optional) The asset in which fees are calculated in. Must be present if the deposit/withdraw was made using non-equivalent assets. The value must be in [SEP-38 Asset Identification Format](sep-0038.md#asset-identification-format). See the [Asset Exchanges](#asset-exchanges) section for more information. |
Expand Down Expand Up @@ -1391,8 +1391,6 @@ There is a small set of changes when upgrading from SEP-6 to SEP-24.
1. Removed `external_extra` transaction property since this should all live in a human readable ` more_info_url`.
1. Changed the response of the deposit and withdraw endpoints from 403 to 200 since this is the expected flow.
1. `/transactions` and `/transaction` are now required endpoints.
1. `Transaction` properties `more_info_url, amount_in, amount_out, amount_fee, and stellar_transaction_id` are now
non-optional.
1. It is now recommended to use a short-lived, one-time JWT in the context of the interactive webapp.

- Anchors should not accept JWT's that have expired or been used before.
Expand All @@ -1409,6 +1407,8 @@ There is a small set of changes when upgrading from SEP-6 to SEP-24.

## Changelog

- `v3.7.1` Make `amount_out` optional in transaction
responses([#1520](https://github.com/stellar/stellar-protocol/pull/1520))
- `v3.7.0` Add `user_action_required_by` field to transaction responses
([#1484](https://github.com/stellar/stellar-protocol/pull/1484/))
- `v3.6.0` Add new `on_hold` status ([#1479](https://github.com/stellar/stellar-protocol/pull/1479/))
Expand Down

0 comments on commit 44672f5

Please sign in to comment.