diff --git a/src/Components/SavedCardItem.res b/src/Components/SavedCardItem.res index 188f9d89d..940b31aa9 100644 --- a/src/Components/SavedCardItem.res +++ b/src/Components/SavedCardItem.res @@ -11,7 +11,7 @@ let make = ( ~setRequiredFieldsBody, ) => { let {themeObj, config, localeString} = Recoil.useRecoilValueFromAtom(RecoilAtoms.configAtom) - let {hideExpiredPaymentMethods, hideSavedCardTickIcon} = Recoil.useRecoilValueFromAtom( + let {hideExpiredPaymentMethods, displayDefaultSavedPaymentIcon} = Recoil.useRecoilValueFromAtom( RecoilAtoms.optionAtom, ) let (cardBrand, setCardBrand) = Recoil.useRecoilState(RecoilAtoms.cardBrand) @@ -119,7 +119,8 @@ let make = ( :
{React.string(paymentMethodType->Utils.snakeToTitleCase)}
} + condition={displayDefaultSavedPaymentIcon && + paymentItem.defaultPaymentMethodSet}> diff --git a/src/Types/PaymentType.res b/src/Types/PaymentType.res index 11162eb9a..abf456cc7 100644 --- a/src/Types/PaymentType.res +++ b/src/Types/PaymentType.res @@ -163,7 +163,7 @@ type options = { paymentMethodsHeaderText?: string, savedPaymentMethodsHeaderText?: string, hideExpiredPaymentMethods: bool, - hideSavedCardTickIcon: bool, + displayDefaultSavedPaymentIcon: bool, } let defaultCardDetails = { scheme: None, @@ -294,7 +294,7 @@ let defaultOptions = { billingAddress: defaultBillingAddress, sdkHandleConfirmPayment: defaultSdkHandleConfirmPayment, hideExpiredPaymentMethods: false, - hideSavedCardTickIcon: false, + displayDefaultSavedPaymentIcon: true, } let getLayout = (str, logger) => { switch str { @@ -977,7 +977,7 @@ let itemToObjMapper = (dict, logger) => { "paymentMethodsHeaderText", "savedPaymentMethodsHeaderText", "hideExpiredPaymentMethods", - "hideSavedCardTickIcon", + "displayDefaultSavedPaymentIcon", ], dict, "options", @@ -1019,7 +1019,7 @@ let itemToObjMapper = (dict, logger) => { paymentMethodsHeaderText: ?getOptionString(dict, "paymentMethodsHeaderText"), savedPaymentMethodsHeaderText: ?getOptionString(dict, "savedPaymentMethodsHeaderText"), hideExpiredPaymentMethods: getBool(dict, "hideExpiredPaymentMethods", false), - hideSavedCardTickIcon: getBool(dict, "hideSavedCardTickIcon", false), + displayDefaultSavedPaymentIcon: getBool(dict, "displayDefaultSavedPaymentIcon", true), } }