From 44be5b69ed95d081d178d9dbed74e9ddcc336a56 Mon Sep 17 00:00:00 2001 From: sakksham7 <130480324+sakksham7@users.noreply.github.com> Date: Thu, 22 Aug 2024 11:22:39 +0530 Subject: [PATCH 1/4] fix: google pay button border (#570) Co-authored-by: Saksham Sharma --- src/RenderPaymentMethods.res | 1 + 1 file changed, 1 insertion(+) diff --git a/src/RenderPaymentMethods.res b/src/RenderPaymentMethods.res index d02c2bbfe..8f0ab28d1 100644 --- a/src/RenderPaymentMethods.res +++ b/src/RenderPaymentMethods.res @@ -60,6 +60,7 @@ let make = ( background: "transparent", marginLeft: "4px", marginRight: "4px", + marginTop: "4px", fontFamily: themeObj.fontFamily, fontSize: themeObj.fontSizeBase, filter: blur, From 04c7e13c7d74e7381a286ad95056016e8c54a4ac Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 22 Aug 2024 05:54:19 +0000 Subject: [PATCH 2/4] chore(release): 0.84.2 [skip ci] ## [0.84.2](https://github.com/juspay/hyperswitch-web/compare/v0.84.1...v0.84.2) (2024-08-22) ### Bug Fixes * google pay button border ([#570](https://github.com/juspay/hyperswitch-web/issues/570)) ([44be5b6](https://github.com/juspay/hyperswitch-web/commit/44be5b69ed95d081d178d9dbed74e9ddcc336a56)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dfb0978d..4f04a5e0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.84.2](https://github.com/juspay/hyperswitch-web/compare/v0.84.1...v0.84.2) (2024-08-22) + + +### Bug Fixes + +* google pay button border ([#570](https://github.com/juspay/hyperswitch-web/issues/570)) ([44be5b6](https://github.com/juspay/hyperswitch-web/commit/44be5b69ed95d081d178d9dbed74e9ddcc336a56)) + ## [0.84.1](https://github.com/juspay/hyperswitch-web/compare/v0.84.0...v0.84.1) (2024-08-13) diff --git a/package-lock.json b/package-lock.json index 837e0bac9..3614dcf69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.84.1", + "version": "0.84.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.84.1", + "version": "0.84.2", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index 6a9ac0fe8..ade0d331a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.84.1", + "version": "0.84.2", "main": "index.js", "private": true, "dependencies": { From 726dc0630a1d040e61f4bdecad6cef14f97a46d4 Mon Sep 17 00:00:00 2001 From: sakksham7 <130480324+sakksham7@users.noreply.github.com> Date: Thu, 22 Aug 2024 11:32:51 +0530 Subject: [PATCH 3/4] refactor: sdk pay now always enabled (#567) Co-authored-by: Saksham Sharma Co-authored-by: Pritish Budhiraja --- src/Components/PayNowButton.res | 6 +----- src/Hooks/UtilityHooks.res | 6 ------ src/TabCard.res | 3 --- src/Types/PaymentType.res | 3 --- src/Utilities/RecoilAtoms.res | 1 - 5 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/Components/PayNowButton.res b/src/Components/PayNowButton.res index 5c043baff..eb2207f50 100644 --- a/src/Components/PayNowButton.res +++ b/src/Components/PayNowButton.res @@ -14,17 +14,13 @@ let make = () => { open RecoilAtoms open Utils let (showLoader, setShowLoader) = React.useState(() => false) + let (isPayNowButtonDisable, setIsPayNowButtonDisable) = React.useState(() => false) let {themeObj, localeString} = configAtom->Recoil.useRecoilValueFromAtom let {sdkHandleConfirmPayment} = optionAtom->Recoil.useRecoilValueFromAtom - let (isPayNowButtonDisable, setIsPayNowButtonDisable) = payNowButtonDisable->Recoil.useRecoilState let confirmPayload = sdkHandleConfirmPayment->PaymentBody.confirmPayloadForSDKButton let buttonText = sdkHandleConfirmPayment.buttonText->Option.getOr(localeString.payNowButton) - React.useEffect1(() => { - setIsPayNowButtonDisable(_ => !sdkHandleConfirmPayment.allowButtonBeforeValidation) - None - }, [sdkHandleConfirmPayment.allowButtonBeforeValidation]) let handleMessage = (event: Types.event) => { let json = event.data->Identity.anyTypeToJson->getStringFromJson("")->safeParse diff --git a/src/Hooks/UtilityHooks.res b/src/Hooks/UtilityHooks.res index 722000f08..09a4ef605 100644 --- a/src/Hooks/UtilityHooks.res +++ b/src/Hooks/UtilityHooks.res @@ -14,14 +14,8 @@ let useHandlePostMessages = (~complete, ~empty, ~paymentType, ~savedMethod=false open RecoilAtoms let loggerState = Recoil.useRecoilValueFromAtom(loggerAtom) - let setIsPayNowButtonDisable = Recoil.useSetRecoilState(payNowButtonDisable) - let {sdkHandleConfirmPayment} = Recoil.useRecoilValueFromAtom(optionAtom) React.useEffect(() => { - if !sdkHandleConfirmPayment.allowButtonBeforeValidation { - let isCompletelyFilled = complete && paymentType !== "" - setIsPayNowButtonDisable(_ => !isCompletelyFilled) - } Utils.handlePostMessageEvents(~complete, ~empty, ~paymentType, ~loggerState, ~savedMethod) None }, (complete, empty, paymentType)) diff --git a/src/TabCard.res b/src/TabCard.res index 4d1dd7217..f9bf64793 100644 --- a/src/TabCard.res +++ b/src/TabCard.res @@ -4,8 +4,6 @@ let make = (~paymentOption: PaymentMethodsRecord.paymentFieldsInfo, ~isActive: b let {themeObj, localeString} = Recoil.useRecoilValueFromAtom(configAtom) let {readOnly, customMethodNames} = Recoil.useRecoilValueFromAtom(optionAtom) let setSelectedOption = Recoil.useSetRecoilState(selectedOptionAtom) - let {sdkHandleConfirmPayment} = optionAtom->Recoil.useRecoilValueFromAtom - let setIsPayNowButtonDisable = Recoil.useSetRecoilState(payNowButtonDisable) let (tabClass, tabLabelClass, tabIconClass) = React.useMemo( () => isActive ? ("Tab--selected", "TabLabel--selected", "TabIcon--selected") : ("", "", ""), [isActive], @@ -17,7 +15,6 @@ let make = (~paymentOption: PaymentMethodsRecord.paymentFieldsInfo, ~isActive: b paymentOption.icon, ) let onClick = _ => { - setIsPayNowButtonDisable(_ => !sdkHandleConfirmPayment.allowButtonBeforeValidation) setSelectedOption(_ => paymentOption.paymentMethodName) }