Skip to content

Commit

Permalink
fix: saved cards screen cards validity issue (#849)
Browse files Browse the repository at this point in the history
Co-authored-by: Pritish Budhiraja <[email protected]>
  • Loading branch information
sakksham7 and PritishBudhiraja authored Dec 23, 2024
1 parent 6463d26 commit ef1bd85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Components/DynamicFields.res
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ let make = (
~cardNumber,
~cardExpiry,
~cvcNumber,
~isSavedCardFlow,
)

useSetInitialRequiredFields(
Expand Down
3 changes: 2 additions & 1 deletion src/Utilities/DynamicFieldsUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ let useRequiredFieldsEmptyAndValid = (
~cardNumber,
~cardExpiry,
~cvcNumber,
~isSavedCardFlow,
) => {
let email = Recoil.useRecoilValueFromAtom(userEmailAddress)
let vpaId = Recoil.useRecoilValueFromAtom(userVpaId)
Expand Down Expand Up @@ -208,7 +209,7 @@ let useRequiredFieldsEmptyAndValid = (
| _ => true
}
})
setAreRequiredFieldsValid(_ => areRequiredFieldsValid)
setAreRequiredFieldsValid(_ => isSavedCardFlow || areRequiredFieldsValid)

let areRequiredFieldsEmpty = fieldsArrWithBillingAddress->Array.reduce(false, (
acc,
Expand Down

0 comments on commit ef1bd85

Please sign in to comment.