Skip to content

Conversation

@ignaciosantise
Copy link
Collaborator

This pull request introduces support for a new "polygon" variant in the POS app, enabling dynamic theming and branding based on an environment variable. It also adds a SecondaryLogo component that conditionally displays the Polygon logo, updates the theme with new color options, and upgrades several @walletconnect dependencies to a newer canary version. The most important changes are grouped below:

Variant Support and Theming:

  • Added EXPO_PUBLIC_VARIANT to .env.example to allow switching between "default" and "polygon" variants. The app now reads this variable to adjust theming and branding. [1] [2]
  • Updated the Sentry initialization to include the current variant in the environment for better error tracking.
  • Modified the payment success screen to use different background colors and themes depending on the selected variant. [1] [2]

Branding Components:

  • Introduced a new SecondaryLogo component that displays the Polygon logo when the "polygon" variant is active, and integrated it into the home, amount, and payment success screens. [1] [2] [3] [4] [5] [6] [7]
  • Added and updated styles for the new logo component in relevant screens. [1] [2]

Theme and Color Updates:

  • Added new color tokens for "polygon-payment-success" and related UI elements in both light and dark themes. [1] [2] [3] [4]

Dependency Upgrades:

  • Upgraded @walletconnect/core, @walletconnect/pos-client, @walletconnect/react-native-compat, and @walletconnect/sign-client to version 2.23.1-canary-init.6 for improved compatibility and features. [1] [2]
  • Cleaned up and removed old or redundant @walletconnect dependency entries in package-lock.json. [1] [2] [3] [4] [5]

These changes make the app more flexible for multi-branding and improve maintainability by centralizing variant-based logic and theming.

Copilot AI review requested due to automatic review settings November 13, 2025 16:51
Copilot finished reviewing on behalf of ignaciosantise November 13, 2025 16:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new "polygon" variant system to the POS app, enabling dynamic theming and branding through an environment variable. The changes include adding a SecondaryLogo component for conditional branding, extending the theme with polygon-specific colors, upgrading WalletConnect dependencies to a newer canary version, and creating variant-specific build scripts.

  • Adds EXPO_PUBLIC_VARIANT environment variable support for "default" and "polygon" variants
  • Implements conditional branding with a SecondaryLogo component displaying Polygon's logo
  • Updates theme with polygon-specific color tokens and adjusts payment success screen theming

Reviewed Changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
dapps/pos-app/.env.example Adds EXPO_PUBLIC_VARIANT environment variable documentation
dapps/pos-app/app/_layout.tsx Includes variant in Sentry environment for error tracking
dapps/pos-app/utils/navigation.ts Adds variant-specific color selection for payment success screen
dapps/pos-app/constants/theme.ts Adds polygon-specific colors and background color for payment success
dapps/pos-app/components/secondary-logo.tsx New component for conditional Polygon logo display
dapps/pos-app/app/payment-success.tsx Integrates SecondaryLogo and variant-based theming
dapps/pos-app/app/index.tsx Adds SecondaryLogo to home screen
dapps/pos-app/app/amount.tsx Adds SecondaryLogo and refactors button text styling
dapps/pos-app/package.json Upgrades WalletConnect dependencies and adds variant-specific build scripts
dapps/pos-app/package-lock.json Updates dependency tree for WalletConnect packages
dapps/pos-app/assets/images/polygon_logo.png Adds Polygon logo asset
Files not reviewed (1)
  • dapps/pos-app/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 10 to 11
"android:build:default": "cp .env.default .env && npm run android:build",
"android:build:polygon": "cp .env.polygon .env && npm run android:build",
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build scripts reference .env.default and .env.polygon files that don't exist in the repository. These files should either be added to the PR or the scripts should be documented in the README to indicate that users need to create them.

Suggested change
"android:build:default": "cp .env.default .env && npm run android:build",
"android:build:polygon": "cp .env.polygon .env && npm run android:build",
"android:build:default": "[ -f .env.default ] && cp .env.default .env && npm run android:build || (echo '.env.default not found. Please create it before running this script.' && exit 1)",
"android:build:polygon": "[ -f .env.polygon ] && cp .env.polygon .env && npm run android:build || (echo '.env.polygon not found. Please create it before running this script.' && exit 1)",

Copilot uses AI. Check for mistakes.
@ignaciosantise ignaciosantise marked this pull request as draft November 13, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants