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

Disambiguate payment acct json form's "country" field #5330

Conversation

ghubstan
Copy link
Contributor

Make it clear the user needs to enter a two letter country code in the api's payment account json form's country field, not a country name. A blank payment account json form now has a country default value = your two letter country code.

The json form's field name was not changed to countryCode for the following reason:

The API's payment account forms are dynamically generated using reflection, and PaymentAccount class hierarchy @Setter methods determine which form fields are included or excluded. Reflection and @Setter methods are also used when reading completed json forms, to set the field values on a new PaymentAccount instance before it is persisted.

CountryBasedPaymentAccount subclasses like F2FAccount have a country field and a @Setter, not a countryCode field, hence this shortcut to informing the user the country field value is a country-code.

Make it clear the user needs to enter a two letter country code
in json form's "country" field, not a country name.

The json form's field name was not changed to "countryCode" in
this change for the following reason:

The API's payment account forms are dynamically generated using
reflection, and PaymentAccount class hierarchy @Setter methods
determine which form fields are included or excluded.  Reflection
and @Setter methods are also used when reading completed json
forms, to set the field values on a new PaymentAccount instance
before it is persisted.

CountryBasedPaymentAccount subclasses have a country field and a
@Setter, not a countryCode field, hence this shortcut to informing
the user the country field value is a country-code.
Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

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

utACK

@ripcurlx ripcurlx merged commit d8676fd into bisq-network:master Mar 18, 2021
@ghubstan ghubstan deleted the 01-clarify-paymentacct-form-country-field branch March 18, 2021 19:37
@ripcurlx ripcurlx added this to the v1.6.0 milestone Mar 19, 2021
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