-
Notifications
You must be signed in to change notification settings - Fork 34
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
[ANCHOR-809] Add sep31 methods to asset config and info response #1537
base: feature/v3
Are you sure you want to change the base?
Conversation
AssetResponse assetResponse = new AssetResponse(); | ||
assetResponse.setQuotesSupported(isQuotesSupported); | ||
assetResponse.setQuotesRequired(isQuotesRequired); | ||
assetResponse.setMinAmount(assetInfo.getSep31().getReceive().getMinAmount()); | ||
assetResponse.setMaxAmount(assetInfo.getSep31().getReceive().getMaxAmount()); | ||
assetResponse.setFields(ImmutableMap.of("type", type)); |
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.
In my opinion type
is too general (i.e in SEP-12 type
is used to refer customer type), we should use something more descriptive, maybe Payment Methods
etc.
Also curious if we can get rid of the the nested fields: { types: { ... } }
structure (This is also used in SEP-6 info response)? fields
is mostly used to list needed KYC info, but now SEP-6 and SEP-31 both has delegate it to SEP-12
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.
In my opinion type is too general (i.e in SEP-12 type is used to refer customer type), we should use something more descriptive, maybe Payment Methods etc.
I think it's fine to call it type
here because SEP-6
also calls the methods, type
. Ideally, we rename both to something like method
but I'm not sure it's making a protocol change so we can rename a field.
Also curious if we can get rid of the the nested fields: { types: { ... } } structure (This is also used in SEP-6 info response)? fields is mostly used to list needed KYC info, but now SEP-6 and SEP-31 both has delegate it to SEP-12
Makes sense to me. SEP-6 does this already and calls the config property, methods
.
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 it's fine to call it type here because SEP-6 also calls the methods, type. Ideally, we rename both to something like method but I'm not sure it's making a protocol change so we can rename a field.
Right I also talked to Jamie about this and let's stick with type
for now
Description
Add
methods
tosep31.receive
in asset config per discussion.Also add
methods
toSep31InfoResponse
. To keep consistency of the sep info response, new SEP-31 response will be look like this:Testing
./gradlew test
Documentation
Will update protocol and anchor tests to reflect the change once we reached agreement on the new response format