Skip to content

Commit

Permalink
Fix external link and filter countries that have been selected (#1430)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophialittlejohn authored May 30, 2023
1 parent e4ef5fb commit c7dbac4
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const OnboardingSettings = () => {
agreements: onboardingAgreements,
kycRestrictedCountries,
kybRestrictedCountries,
externalOnboardingUrl: values.externalOnboardingUrl,
externalOnboardingUrl: useExternalUrl ? values.externalOnboardingUrl : undefined,
},
}
updateConfigTx([poolId, amendedMetadata])
Expand Down Expand Up @@ -255,9 +255,11 @@ export const OnboardingSettings = () => {
list="kybSupportedCountries"
/>
<datalist id="kybSupportedCountries">
{Object.entries(KYB_COUNTRY_CODES).map(([code, country]) => (
<option key={code} value={country} id={code} />
))}
{Object.entries(KYB_COUNTRY_CODES)
.filter(([_, country]) => !formik.values.kybRestrictedCountries.includes(country))
.map(([code, country]) => (
<option key={code} value={country} id={code} />
))}
</datalist>
<Stack gap={0}>
{formik.values.kybRestrictedCountries.length > 0 && (
Expand Down Expand Up @@ -314,9 +316,11 @@ export const OnboardingSettings = () => {
list="kycSupportedCountries"
/>
<datalist id="kycSupportedCountries">
{Object.entries(KYC_COUNTRY_CODES).map(([code, country]) => (
<option key={code} value={country} id={code} />
))}
{Object.entries(KYC_COUNTRY_CODES)
.filter(([_, country]) => !formik.values.kycRestrictedCountries.includes(country))
.map(([code, country]) => (
<option key={code} value={country} id={code} />
))}
</datalist>
<Stack gap={0}>
{formik.values.kycRestrictedCountries.length > 0 && (
Expand Down

0 comments on commit c7dbac4

Please sign in to comment.