From 767d659e47c55b2367882de8624f72751cb9818e Mon Sep 17 00:00:00 2001 From: "truph01 (via MelvinBot)" Date: Mon, 4 May 2026 16:26:42 +0000 Subject: [PATCH 1/2] Disable autocorrect and spellcheck on international bank account form text inputs iOS autocorrect silently modifies structured financial data (account numbers, IFSC codes, SWIFT codes) in the international deposit account forms. This adds autoCorrect={false} and spellCheck={false} to TextInput fields across all five affected bank form pages, applied conditionally so non-text components (ValuePicker, AddressSearch, PushRowWithModal) are unaffected. Co-authored-by: truph01 --- .../subSteps/AccountHolderDetails.tsx | 4 +- .../BankInfo/subSteps/BankAccountDetails.tsx | 4 +- .../subPages/AccountHolderInformation.tsx | 64 ++++++++++--------- .../subPages/BankAccountDetails.tsx | 36 ++++++----- .../subPages/BankInformation.tsx | 56 ++++++++-------- 5 files changed, 90 insertions(+), 74 deletions(-) diff --git a/src/pages/ReimbursementAccount/NonUSD/BankInfo/subSteps/AccountHolderDetails.tsx b/src/pages/ReimbursementAccount/NonUSD/BankInfo/subSteps/AccountHolderDetails.tsx index aaac8cf7c636..8b1aa034b92b 100644 --- a/src/pages/ReimbursementAccount/NonUSD/BankInfo/subSteps/AccountHolderDetails.tsx +++ b/src/pages/ReimbursementAccount/NonUSD/BankInfo/subSteps/AccountHolderDetails.tsx @@ -119,13 +119,14 @@ function AccountHolderDetails({onNext, isEditing, corpayFields}: BankInfoSubStep ); } + const InputComponent = getInputComponent(field); return ( ); diff --git a/src/pages/ReimbursementAccount/NonUSD/BankInfo/subSteps/BankAccountDetails.tsx b/src/pages/ReimbursementAccount/NonUSD/BankInfo/subSteps/BankAccountDetails.tsx index 294a0963fe8e..ef5fd99fd785 100644 --- a/src/pages/ReimbursementAccount/NonUSD/BankInfo/subSteps/BankAccountDetails.tsx +++ b/src/pages/ReimbursementAccount/NonUSD/BankInfo/subSteps/BankAccountDetails.tsx @@ -86,13 +86,14 @@ function BankAccountDetails({onNext, isEditing, corpayFields}: BankInfoSubStepPr return getInputForValueSet(field, SafeString(defaultValues[field.id as keyof typeof defaultValues]), isEditing, styles); } + const InputComponent = getInputComponent(field); return ( ); diff --git a/src/pages/settings/Wallet/InternationalDepositAccount/subPages/AccountHolderInformation.tsx b/src/pages/settings/Wallet/InternationalDepositAccount/subPages/AccountHolderInformation.tsx index fa153a6bf3f5..0d44f8c68220 100644 --- a/src/pages/settings/Wallet/InternationalDepositAccount/subPages/AccountHolderInformation.tsx +++ b/src/pages/settings/Wallet/InternationalDepositAccount/subPages/AccountHolderInformation.tsx @@ -91,36 +91,40 @@ function AccountHolderInformation({isEditing, onNext, formValues, fieldsMap}: Cu {translate('addPersonalBankAccount.accountHolderInformationStepHeader')} {Object.values(fieldsMap[CONST.CORPAY_FIELDS.PAGE_NAME.ACCOUNT_HOLDER_DETAILS] ?? {}) .sort((a, b) => CONST.CORPAY_FIELDS.ACCOUNT_HOLDER_FIELDS.indexOf(a.id) - CONST.CORPAY_FIELDS.ACCOUNT_HOLDER_FIELDS.indexOf(b.id)) - .map((field, index) => ( - - - - ))} + .map((field, index) => { + const InputComponent = getInputComponent(field); + return ( + + + + ); + })} ); diff --git a/src/pages/settings/Wallet/InternationalDepositAccount/subPages/BankAccountDetails.tsx b/src/pages/settings/Wallet/InternationalDepositAccount/subPages/BankAccountDetails.tsx index f8b8d86efdd3..078f0b6b55eb 100644 --- a/src/pages/settings/Wallet/InternationalDepositAccount/subPages/BankAccountDetails.tsx +++ b/src/pages/settings/Wallet/InternationalDepositAccount/subPages/BankAccountDetails.tsx @@ -81,22 +81,26 @@ function BankAccountDetails({isEditing, onNext, onMove, formValues, fieldsMap}: shouldShowFullPageOfflineView /> - {Object.values(fieldsMap[CONST.CORPAY_FIELDS.PAGE_NAME.ACCOUNT_DETAILS] ?? {}).map((field) => ( - 0 ? [styles.mhn5, styles.pv1] : [styles.pv2]} - key={field.id} - > - 0 ? ValuePicker : TextInput} - inputID={field.id} - defaultValue={formValues[field.id]} - label={field.label + (field.isRequired ? '' : ` (${translate('common.optional')})`)} - items={(field.valueSet ?? []).map(({id, text}) => ({value: id, label: text}))} - shouldSaveDraft={!isEditing} - forwardedFSClass={CONST.FULLSTORY.CLASS.MASK} - /> - - ))} + {Object.values(fieldsMap[CONST.CORPAY_FIELDS.PAGE_NAME.ACCOUNT_DETAILS] ?? {}).map((field) => { + const isValuePicker = (field.valueSet ?? []).length > 0; + return ( + + ({value: id, label: text}))} + shouldSaveDraft={!isEditing} + forwardedFSClass={CONST.FULLSTORY.CLASS.MASK} + {...(!isValuePicker ? {autoCorrect: false, spellCheck: false} : {})} + /> + + ); + })} {translate('addPersonalBankAccount.bankInformationStepHeader')} {Object.values(fieldsMap[CONST.CORPAY_FIELDS.PAGE_NAME.BANK_INFORMATION] ?? {}) .sort((a, b) => CONST.CORPAY_FIELDS.BANK_INFORMATION_FIELDS.indexOf(a.id) - CONST.CORPAY_FIELDS.BANK_INFORMATION_FIELDS.indexOf(b.id)) - .map((field, index) => ( - - - - ))} + .map((field, index) => { + const InputComponent = getInputComponent(field); + return ( + + + + ); + })} ); From 0dbdc96ed6f180f0ed0edad0bee99762a3f20d0a Mon Sep 17 00:00:00 2001 From: "truph01 (via MelvinBot)" Date: Mon, 4 May 2026 16:41:43 +0000 Subject: [PATCH 2/2] Fix ESLint jsx-props-no-spreading errors by using explicit conditional props Co-authored-by: truph01 --- .../NonUSD/BankInfo/subSteps/AccountHolderDetails.tsx | 3 ++- .../NonUSD/BankInfo/subSteps/BankAccountDetails.tsx | 3 ++- .../subPages/AccountHolderInformation.tsx | 3 ++- .../subPages/BankAccountDetails.tsx | 3 ++- .../InternationalDepositAccount/subPages/BankInformation.tsx | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/pages/ReimbursementAccount/NonUSD/BankInfo/subSteps/AccountHolderDetails.tsx b/src/pages/ReimbursementAccount/NonUSD/BankInfo/subSteps/AccountHolderDetails.tsx index 8b1aa034b92b..0859872626d0 100644 --- a/src/pages/ReimbursementAccount/NonUSD/BankInfo/subSteps/AccountHolderDetails.tsx +++ b/src/pages/ReimbursementAccount/NonUSD/BankInfo/subSteps/AccountHolderDetails.tsx @@ -140,7 +140,8 @@ function AccountHolderDetails({onNext, isEditing, corpayFields}: BankInfoSubStep }} hint={field.id === ACCOUNT_HOLDER_NAME ? translate('bankInfoStep.accountHolderNameDescription') : undefined} forwardedFSClass={CONST.FULLSTORY.CLASS.MASK} - {...(InputComponent === TextInput ? {autoCorrect: false, spellCheck: false} : {})} + autoCorrect={InputComponent === TextInput ? false : undefined} + spellCheck={InputComponent === TextInput ? false : undefined} /> ); diff --git a/src/pages/ReimbursementAccount/NonUSD/BankInfo/subSteps/BankAccountDetails.tsx b/src/pages/ReimbursementAccount/NonUSD/BankInfo/subSteps/BankAccountDetails.tsx index ef5fd99fd785..745aab1337b4 100644 --- a/src/pages/ReimbursementAccount/NonUSD/BankInfo/subSteps/BankAccountDetails.tsx +++ b/src/pages/ReimbursementAccount/NonUSD/BankInfo/subSteps/BankAccountDetails.tsx @@ -107,7 +107,8 @@ function BankAccountDetails({onNext, isEditing, corpayFields}: BankInfoSubStepPr country: '', }} forwardedFSClass={CONST.FULLSTORY.CLASS.MASK} - {...(InputComponent === TextInput ? {autoCorrect: false, spellCheck: false} : {})} + autoCorrect={InputComponent === TextInput ? false : undefined} + spellCheck={InputComponent === TextInput ? false : undefined} /> ); diff --git a/src/pages/settings/Wallet/InternationalDepositAccount/subPages/AccountHolderInformation.tsx b/src/pages/settings/Wallet/InternationalDepositAccount/subPages/AccountHolderInformation.tsx index 0d44f8c68220..9e4886535b11 100644 --- a/src/pages/settings/Wallet/InternationalDepositAccount/subPages/AccountHolderInformation.tsx +++ b/src/pages/settings/Wallet/InternationalDepositAccount/subPages/AccountHolderInformation.tsx @@ -120,7 +120,8 @@ function AccountHolderInformation({isEditing, onNext, formValues, fieldsMap}: Cu lng: '', }} forwardedFSClass={CONST.FULLSTORY.CLASS.MASK} - {...(InputComponent === TextInput ? {autoCorrect: false, spellCheck: false} : {})} + autoCorrect={InputComponent === TextInput ? false : undefined} + spellCheck={InputComponent === TextInput ? false : undefined} /> ); diff --git a/src/pages/settings/Wallet/InternationalDepositAccount/subPages/BankAccountDetails.tsx b/src/pages/settings/Wallet/InternationalDepositAccount/subPages/BankAccountDetails.tsx index 078f0b6b55eb..120a18e2e79f 100644 --- a/src/pages/settings/Wallet/InternationalDepositAccount/subPages/BankAccountDetails.tsx +++ b/src/pages/settings/Wallet/InternationalDepositAccount/subPages/BankAccountDetails.tsx @@ -96,7 +96,8 @@ function BankAccountDetails({isEditing, onNext, onMove, formValues, fieldsMap}: items={(field.valueSet ?? []).map(({id, text}) => ({value: id, label: text}))} shouldSaveDraft={!isEditing} forwardedFSClass={CONST.FULLSTORY.CLASS.MASK} - {...(!isValuePicker ? {autoCorrect: false, spellCheck: false} : {})} + autoCorrect={!isValuePicker ? false : undefined} + spellCheck={!isValuePicker ? false : undefined} /> ); diff --git a/src/pages/settings/Wallet/InternationalDepositAccount/subPages/BankInformation.tsx b/src/pages/settings/Wallet/InternationalDepositAccount/subPages/BankInformation.tsx index 06092c23d040..5c2f0716bd08 100644 --- a/src/pages/settings/Wallet/InternationalDepositAccount/subPages/BankInformation.tsx +++ b/src/pages/settings/Wallet/InternationalDepositAccount/subPages/BankInformation.tsx @@ -109,7 +109,8 @@ function BankInformation({isEditing, onNext, formValues, fieldsMap}: CustomSubPa lng: '', }} forwardedFSClass={CONST.FULLSTORY.CLASS.MASK} - {...(InputComponent === TextInput ? {autoCorrect: false, spellCheck: false} : {})} + autoCorrect={InputComponent === TextInput ? false : undefined} + spellCheck={InputComponent === TextInput ? false : undefined} /> );