brave / ads-ui

Self-service ads UI
Mozilla Public License 2.0
23 stars 11 forks source link

Production Release 2024-08-22 #1328

Closed IanKrieger closed 3 weeks ago

IanKrieger commented 3 weeks ago

Fixes

Chores

github-actions[bot] commented 3 weeks ago

[puLL-Merge] - brave/ads-ui@1328

Description

This PR updates dependencies and modifies the campaign editing and payment flow in the ads management system. It adds support for specifying a payment method when creating a payment session and updates the process of submitting an edited campaign.

Changes ### Changes 1. `.github/workflows/codeql-analysis.yml`: - Updated CodeQL action versions from 3.26.0 to 3.26.2. 2. `package.json` and `pnpm-lock.yaml`: - Updated several dependencies, including: - `@mui/x-data-grid` and `@mui/x-date-pickers` from 7.12.1 to 7.13.0 - `highcharts` from 11.4.6 to 11.4.7 - `lint-staged` from 15.2.8 to 15.2.9 - `typescript-eslint` from 8.0.1 to 8.1.0 - `vite` from 5.4.0 to 5.4.1 3. `src/checkout/hooks/useCreatePaymentSession.ts`: - Modified `replaceSession` function to accept an optional `paymentMethod` parameter. 4. `src/checkout/lib/index.ts`: - Updated `createPaymentSession` function to include `paymentMethod` in the request body. 5. `src/user/views/adsManager/views/advanced/components/form/EditCampaign.tsx`: - Refactored the campaign update process: - Moved mutation logic into a new `doSubmitEdit` function. - Added support for passing the payment type to the payment session creation.

Possible Issues

The changes to the payment flow may require corresponding updates on the server-side to handle the new paymentMethod parameter. Ensure that the backend is prepared to process this new information.

Security Hotspots

No significant security issues were identified in this change. However, as always, care should be taken when handling payment-related information to ensure it's properly secured and validated both on the client and server sides.