Skip to content

Commit

Permalink
fix: name changes displayDefaultSavedPaymentIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
PritishBudhiraja committed Jun 10, 2024
1 parent ee4f0ae commit 22f9eb1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/Components/SavedCardItem.res
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -119,7 +119,8 @@ let make = (
</div>
: <div> {React.string(paymentMethodType->Utils.snakeToTitleCase)} </div>}
<RenderIf
condition={!hideSavedCardTickIcon && paymentItem.defaultPaymentMethodSet}>
condition={displayDefaultSavedPaymentIcon &&
paymentItem.defaultPaymentMethodSet}>
<Icon size=18 name="checkmark" style={color: themeObj.colorPrimary} />
</RenderIf>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/Types/PaymentType.res
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ type options = {
paymentMethodsHeaderText?: string,
savedPaymentMethodsHeaderText?: string,
hideExpiredPaymentMethods: bool,
hideSavedCardTickIcon: bool,
displayDefaultSavedPaymentIcon: bool,
}
let defaultCardDetails = {
scheme: None,
Expand Down Expand Up @@ -294,7 +294,7 @@ let defaultOptions = {
billingAddress: defaultBillingAddress,
sdkHandleConfirmPayment: defaultSdkHandleConfirmPayment,
hideExpiredPaymentMethods: false,
hideSavedCardTickIcon: false,
displayDefaultSavedPaymentIcon: true,
}
let getLayout = (str, logger) => {
switch str {
Expand Down Expand Up @@ -977,7 +977,7 @@ let itemToObjMapper = (dict, logger) => {
"paymentMethodsHeaderText",
"savedPaymentMethodsHeaderText",
"hideExpiredPaymentMethods",
"hideSavedCardTickIcon",
"displayDefaultSavedPaymentIcon",
],
dict,
"options",
Expand Down Expand Up @@ -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),
}
}

Expand Down

0 comments on commit 22f9eb1

Please sign in to comment.