Skip to content
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

SEP-24: Add lang field to GET /transactions and /transaction #1191

Merged
merged 4 commits into from
May 5, 2022
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 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: 2022-05-03
Version 2.2.1
Updated: 2022-05-05
Version 2.3.0
```

## Simple Summary
Expand Down Expand Up @@ -184,7 +184,7 @@ Name | Type | Description
`memo` | string | (optional) Value of memo to attach to transaction, for `hash` this should be base64-encoded. Because a memo can be specified in the SEP-10 JWT for [Shared Accounts](#shared-omnibus-or-pooled-accounts), this field can be different than the value included in the SEP-10 JWT. For example, a client application could use the value passed for this parameter as a reference number used to match payments made to `account`.
`wallet_name` | string | (optional) In communications / pages about the deposit, anchor should display the wallet name to the user to explain where funds are going.
`wallet_url` | string | (optional) Anchor should link to this when notifying the user that the transaction has completed.
`lang` | string | (optional) Defaults to `en`. Language code specified using [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1). `error` fields in the response, as well as the interactive flow UI and any other user-facing strings returned for this transaction should be in this language.
`lang` | string | (optional) Defaults to `en`. Language code specified using [RFC 4646] which means it can also accept locale in the format `en-US`. `error` fields in the response, as well as the interactive flow UI and any other user-facing strings returned for this transaction should be in this language.
`claimable_balance_supported` | boolean | (optional) True if the client supports receiving deposit transactions as a claimable balance, false otherwise.

Additionally, any [SEP-9](sep-0009.md) parameters may be passed as well to make the onboarding experience simpler.
Expand Down Expand Up @@ -323,7 +323,7 @@ Name | Type | Description
`memo_type` | string | (**deprecated**, optional) Type of `memo`. One of `text`, `id` or `hash`. Deprecated because memos used to identify users of the same Stellar account should always be of type of `id`.
`wallet_name` | string | (optional) In communications / pages about the withdrawal, anchor should display the wallet name to the user to explain where funds are coming from.
`wallet_url` | string | (optional) Anchor can show this to the user when referencing the wallet involved in the withdrawal (ex. in the anchor's transaction history).
`lang` | string | (optional) Defaults to `en`. Language code specified using [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1). `error` fields in the response, as well as the interactive flow UI and any other user-facing strings returned for this transaction should be in this language.
`lang` | string | (optional) Defaults to `en`. Language code specified using [RFC 4646] which means it can also accept locale in the format `en-US`. `error` fields in the response, as well as the interactive flow UI and any other user-facing strings returned for this transaction should be in this language.

Additionally, any [SEP-9](sep-0009.md) parameters may be passed as well to make the onboarding experience simpler.

Expand Down Expand Up @@ -514,7 +514,7 @@ Request parameters:

Name | Type | Description
-----|------|------------
`lang` | string | (optional) Defaults to `en`. Language code specified using [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1). `description` fields in the response should be in this language.
`lang` | string | (optional) Defaults to `en`. Language code specified using [RFC 4646] which means it can also accept locale in the format `en-US`. `description` fields in the response should be in this language.

### Response

Expand Down Expand Up @@ -663,6 +663,7 @@ Name | Type | Description
`limit` | int | (optional) The response should contain at most `limit` transactions.
`kind` | string | (optional) The kind of transaction that is desired. Should be either `deposit` or `withdrawal`.
`paging_id` | string | (optional) The response should contain transactions starting prior to this ID (exclusive).
`lang` | string | (optional) Defaults to `en`. Language code specified using [RFC 4646] which means it can also accept locale in the format `en-US`.

On success the endpoint should return `200 OK` HTTP status code and a JSON object with the following fields:

Expand Down Expand Up @@ -869,6 +870,7 @@ Name | Type | Description
`id` | string | (optional) The id of the transaction.
`stellar_transaction_id` | (optional) string | The stellar transaction id of the transaction.
`external_transaction_id` | (optional) string | The external transaction id of the transaction.
`lang` | string | (optional) Defaults to `en`. Language code specified using [RFC 4646] which means it can also accept locale in the format `en-US`.

One of `id`, `stellar_transaction_id` or `external_transaction_id` is required.

Expand Down Expand Up @@ -935,5 +937,9 @@ There is a small set of changes when upgrading from SEP-6 to SEP-24.
* Solar wallet: https://solarwallet.io

## Changelog
* `v2.3.0`: Change `lang` format from [ISO639-1] to [RFC4646] which is a superset of [ISO639-1]. Add `lang` field to GET `/transactions` and `/transaction`. ([#1191](https://github.com/stellar/stellar-protocol/pull/1191))
* `v2.2.1`: Make `completed_at` field optional. ([#1185](https://github.com/stellar/stellar-protocol/pull/1185))
* `v2.2.0`: Deprecate refunded boolean. Add refund object to transaction records. ([#1128](https://github.com/stellar/stellar-protocol/pull/1128))

[RFC 4646]: https://datatracker.ietf.org/doc/html/rfc4646
[ISO 639-1]: https://en.wikipedia.org/wiki/ISO_639-1