From a12363afe4414c16a3a0263607c2878cb937e669 Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja Date: Wed, 14 Aug 2024 18:30:44 +0530 Subject: [PATCH 01/10] ci: add assignee to a PR (#563) Co-authored-by: Saksham Sharma --- .github/workflows/pr-title-spell-check.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/pr-title-spell-check.yml b/.github/workflows/pr-title-spell-check.yml index 424b18127..f62979b4f 100644 --- a/.github/workflows/pr-title-spell-check.yml +++ b/.github/workflows/pr-title-spell-check.yml @@ -26,3 +26,15 @@ jobs: uses: crate-ci/typos@master with: files: ./pr_title.txt + + - name: Assign to author + run: | + PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") + + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/assignees \ + -d '{"assignees":["${{ github.event.pull_request.user.login }}"]}' \ No newline at end of file From b71b323ec3d6d4c47a89d3ec4cf863a2179c8496 Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja Date: Tue, 20 Aug 2024 18:10:11 +0530 Subject: [PATCH 02/10] docs: update CODEOWNERS file --- .github/CODEOWNERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bafbb255a..840e56b3d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1,4 @@ -- @akash-c-k @ArushKapoorJuspay @PritishBudhiraja @seekshiva @vsrivatsa-edinburgh @swamu +- @akash-c-k @ArushKapoorJuspay @PritishBudhiraja @seekshiva @swamu docs/ @akash-c-k LICENSE @akash-c-k @@ -6,7 +6,7 @@ README.md @akash-c-k SECURITY.md @akash-c-k .gitignore @ArushKapoorJuspay @PritishBudhiraja -Hyperswitch-React-Demo-App/ @PritishBudhiraja @seekshiva @ArushKapoorJuspay @vsrivatsa-edinburgh +Hyperswitch-React-Demo-App/ @PritishBudhiraja @seekshiva @ArushKapoorJuspay .husky/ @PritishBudhiraja @seekshiva .github/ @PritishBudhiraja @seekshiva @@ -16,4 +16,4 @@ aws/ @seekshiva webpack.dev.js @ArushKapoorJuspay @PritishBudhiraja @seekshiva webpack.common.js @ArushKapoorJuspay @PritishBudhiraja @seekshiva -src/ @seekshiva @PritishBudhiraja @ArushKapoorJuspay @vsrivatsa-edinburgh @swamu +src/ @seekshiva @PritishBudhiraja @ArushKapoorJuspay @swamu 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 03/10] 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 04/10] 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 05/10] 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) }