-
Notifications
You must be signed in to change notification settings - Fork 304
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 & 6: update & add lang
parameter to on relevant endpoints
#1320
Conversation
@@ -230,7 +230,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 [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. | |||
`lang` | string | (optional) Defaults to `en` if not specified or if the specified language is not supported. 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. |
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.
I remember there was a conversation to fail and reject the transaction if lang
is specified and not supported.
Do we want to dictate in the standard?
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.
I think its better than returning 400 in this case, otherwise wallets will have to resubmit their requests with en
anyway.
lang
defaults to 'en' when provided value is not supportedlang
parameter to on relevant endpoints
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.
LGTM.
This is a request from Lobstr. Currently, Polaris and other anchors return 400 when the specified language is not supported by the anchor. But because anchors don't provide a list of supported languages, the wallets have no choice but to attempt the request with the user's preferred language anyway. Therefore, anchors should be forgiving when an unsupported language is passed and default to english.