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

[ANCHOR-362] SEP-6: Update reference server to set required_customer_info_updates #1161

Merged
merged 4 commits into from
Oct 19, 2023

Conversation

philipliu
Copy link
Contributor

Description

This updates the SEP-6 E2E test to use the required_customer_info_updates field when providing KYC updates.

Context

Currently, this field is not set by the reference server implementation. This is needed so that the demo wallet could prompt the user to submit the missing KYC information.

Testing

  • ./gradlew test

Known limitations

N/A

@philipliu philipliu marked this pull request as ready for review October 13, 2023 21:12
Copy link
Collaborator

@lijamie98 lijamie98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Please feel free to merge after the comments are taken care of.

@@ -99,8 +116,7 @@ class Sep6End2EndTest(val config: TestConfig, val jwt: String) {
)
assertEquals(completedDepositTxn.transaction.id, transactionByStellarId.transaction.id)

val expectedStatuses =
listOf("incomplete", "pending_anchor", "pending_customer_info_update", "completed")
val expectedStatuses = listOf("incomplete", "pending_customer_info_update", "completed")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can we use the enum here?

@@ -55,11 +55,18 @@ class CustomerService(private val customerRepository: CustomerRepository) {
customer.copy(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Is there anything like BeanUtils in Kotlin?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or use gson.toJson and gson.fromJson for copying?

I think this is for the reference and does not require critical performance but rather explanations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote it this way since I don't want null request fields to delete a previously set customer field. By default, BeanUtils#copyProperties does not ignore null fields, we would need to write a wrapper around it if we want this behavior. This is the same reason, I did not use gson here.

@philipliu philipliu merged commit db7ab03 into stellar:sep-6 Oct 19, 2023
5 checks passed
@philipliu philipliu deleted the feature/anchor-362-demo-wallet branch October 19, 2023 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants