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

Add contribution banner customizer, migrate public channel page files #4494

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

jlbyrne
Copy link
Contributor

@jlbyrne jlbyrne commented Aug 16, 2024

@Miyayes
Copy link
Collaborator

Miyayes commented Aug 17, 2024

@jlbyrne Should hide the "Add account" on GitHub, since we no longer support adding GH.

Copy link

[puLL-Merge] - brave-intl/publishers@4494

Description

This PR introduces a new feature for contribution pages, allowing users to customize their channel's appearance and receive crypto payments. It includes new API endpoints, frontend components, and styles to support this functionality.

Possible Issues

  1. The PR introduces a large amount of new code, which may increase the complexity of the codebase and make it harder to maintain.
  2. Some of the new components (e.g., CryptoPaymentWidget) are quite large and may benefit from further modularization.
  3. The PR adds several new dependencies (e.g., @solana/web3.js, web3) which may increase the bundle size and introduce potential vulnerabilities if not kept up-to-date.

Security Hotspots

  1. The sendPayment function in CryptoPaymentWidget.jsx handles cryptocurrency transactions. This is a critical area that should be carefully reviewed for potential vulnerabilities or edge cases that could lead to loss of funds.

  2. The image_properties function in contribution_page_controller.rb processes user-uploaded images. Ensure that proper sanitization and validation are in place to prevent potential file upload vulnerabilities.

  3. The new API endpoints in contribution_page_controller.rb and public_channel_controller.rb should be reviewed to ensure proper authentication and authorization checks are in place.

Changes

Changes

  1. app/controllers/api/nextv1/contribution_page_controller.rb:

    • Added new controller for handling contribution page operations (CRUD for channel banners, image uploads).
  2. app/controllers/api/nextv1/public_channel_controller.rb:

    • Added new controller for public channel information and ratio fetching.
  3. config/routes.rb:

    • Added new routes for contribution pages and public channels.
  4. nextjs/package.json:

    • Updated dependencies, including new crypto-related packages.
  5. nextjs/src/app/[locale]/c/[public_identifier]/:

    • Added new components for the public channel page, including CryptoPaymentWidget, QRCodeModal, and SuccessWidget.
  6. nextjs/src/app/[locale]/publishers/contribution_page/:

    • Added new components for the contribution page editor.
  7. nextjs/src/styles/:

    • Added new CSS modules for ContributionBanner, PublicChannelPage, and Toast.
  8. nextjs/src/constant/:

    • Added new JSON files for cryptocurrency ABI definitions.
  9. Various other files:

    • Updated to support the new contribution page feature, including changes to navigation, layouts, and translations.

Copy link

The following commits were not verified:
0610bae (unsigned)

@jlbyrne jlbyrne merged commit 5f8417e into staging Aug 21, 2024
7 checks passed
@jlbyrne jlbyrne deleted the feat/contribution-banner branch August 21, 2024 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants