Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production Release 2024-08-08 #1311

Merged
merged 5 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"private": true,
"type": "module",
"dependencies": {
"@apollo/client": "3.11.1",
"@apollo/client": "3.11.2",
"@emotion/react": "11.13.0",
"@emotion/styled": "11.13.0",
"@fontsource/inter": "5.0.19",
"@fontsource/inter": "5.0.20",
"@fontsource/mulish": "5.0.18",
"@fontsource/poppins": "5.0.14",
"@graphql-typed-document-node/core": "3.2.0",
Expand All @@ -18,11 +18,11 @@
"@lingui/format-po": "4.11.2",
"@lingui/macro": "4.11.2",
"@lingui/react": "4.11.2",
"@mui/icons-material": "5.16.5",
"@mui/icons-material": "5.16.6",
"@mui/lab": "5.0.0-alpha.173",
"@mui/material": "5.16.5",
"@mui/x-data-grid": "7.11.1",
"@mui/x-date-pickers": "7.11.1",
"@mui/material": "5.16.6",
"@mui/x-data-grid": "7.12.0",
"@mui/x-date-pickers": "7.12.0",
"bignumber.js": "9.1.2",
"dayjs": "1.11.12",
"formik": "2.4.6",
Expand Down Expand Up @@ -62,7 +62,7 @@
"devDependencies": {
"@eslint/js": "8.57.0",
"@graphql-codegen/cli": "5.0.2",
"@graphql-codegen/client-preset": "4.3.2",
"@graphql-codegen/client-preset": "4.3.3",
"@graphql-codegen/introspection": "4.0.3",
"@graphql-eslint/eslint-plugin": "3.20.1",
"@lingui/cli": "4.11.2",
Expand All @@ -82,17 +82,17 @@
"eslint-plugin-lingui": "0.3.0",
"eslint-plugin-react": "7.35.0",
"eslint-plugin-react-hooks": "4.6.2",
"husky": "9.1.3",
"husky": "9.1.4",
"knip": "5.27.0",
"lint-staged": "15.2.7",
"lint-staged": "15.2.8",
"npm-run-all2": "6.2.2",
"prettier": "3.3.3",
"typescript": "5.5.4",
"typescript-eslint": "7.17.0",
"typescript-eslint": "8.0.0",
"vite": "5.3.5",
"vite-plugin-checker": "0.7.2",
"vite-tsconfig-paths": "4.3.2",
"vitest": "2.0.4"
"vitest": "2.0.5"
},
"engines": {
"node": ">=20",
Expand Down
583 changes: 279 additions & 304 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"schedule:weekends"
],
"labels": ["dependencies"],
"postUpdateOptions": ["npmDedupe"],
"postUpdateOptions": ["pnpmDedupe"],
"packageRules": [
{
"matchUpdateTypes": ["major"],
Expand Down
4 changes: 2 additions & 2 deletions src/checkout/hooks/useValidatePaymentSession.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState } from "react";
import { fetchPaymentSession } from "@/checkout/lib";
import { validatePaymentSession } from "@/checkout/lib";

interface Props {
sessionId: string | null;
Expand All @@ -13,7 +13,7 @@ export function useValidatePaymentSession(props: Props) {
useEffect(() => {
if (props.campaignId) {
setLoading(true);
fetchPaymentSession(props.campaignId, props.sessionId)
validatePaymentSession(props.campaignId, props.sessionId)
.catch((e) => {
setError(e.message);
})
Expand Down
14 changes: 10 additions & 4 deletions src/checkout/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,25 @@ export async function createPaymentSession(
}
}

export async function fetchPaymentSession(
export async function validatePaymentSession(
campaignId: string,
sessionId: string | null,
): Promise<void> {
let baseUrl = `/payments/checkout-session?referenceId=${campaignId}`;
const body: { referenceId: string; sessionId?: string } = {
referenceId: campaignId,
};
if (sessionId) {
baseUrl = `${baseUrl}&sessionId=${sessionId}`;
body.sessionId = sessionId;
}

const res = await fetch(buildAdServerEndpoint(baseUrl), {
const res = await fetch(buildAdServerEndpoint("/payments/checkout-session"), {
method: "PUT",
mode: "cors",
credentials: "include",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});

if (res.status !== 200) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Assets/hooks/useGetImagePreviewUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async function fetchResource(url: string): Promise<Response> {
cache: "no-cache",
});
return response;
} catch (e) {
} catch {
return new Response(null, { status: 502 });
}
}
Expand Down
1 change: 1 addition & 0 deletions src/components/Creatives/hooks/useSubmitCreative.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export function useSubmitCreative(props: { id: string }) {
variables: {
input: {
id: props.id,
name: input.name,
payloadNotification: input.payloadNotification,
payloadInlineContent: _.omit(
input.payloadInlineContent,
Expand Down