Skip to content

Commit

Permalink
fix: wallets on top for saved cards flow
Browse files Browse the repository at this point in the history
  • Loading branch information
PritishBudhiraja committed Jul 2, 2024
1 parent d0c836d commit ec7d571
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/PaymentElement.res
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,14 @@ let make = (~cardProps, ~expiryProps, ~cvcProps, ~paymentType: CardThemeType.mod

let paymentOrder = paymentMethodOrder->getOptionalArr->removeDuplicate

let sortSavedMethodsBasedOnPriority =
let sortSavedMethodsBasedOnPriority = switch paymentOrder {
| [] => finalSavedPaymentMethods
| paymentOrder =>
finalSavedPaymentMethods->PaymentUtils.sortCustomerMethodsBasedOnPriority(
paymentOrder,
~displayDefaultSavedPaymentIcon,
)
}

setSavedMethods(_ => sortSavedMethodsBasedOnPriority)
setLoadSavedCards(_ =>
Expand Down

0 comments on commit ec7d571

Please sign in to comment.