-
Notifications
You must be signed in to change notification settings - Fork 50
chore: pos variant #269
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
base: main
Are you sure you want to change the base?
chore: pos variant #269
Conversation
There was a problem hiding this 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_VARIANTenvironment 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.
dapps/pos-app/package.json
Outdated
| "android:build:default": "cp .env.default .env && npm run android:build", | ||
| "android:build:polygon": "cp .env.polygon .env && npm run android:build", |
Copilot
AI
Nov 13, 2025
There was a problem hiding this comment.
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.
| "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)", |
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
SecondaryLogocomponent that conditionally displays the Polygon logo, updates the theme with new color options, and upgrades several@walletconnectdependencies to a newer canary version. The most important changes are grouped below:Variant Support and Theming:
EXPO_PUBLIC_VARIANTto.env.exampleto allow switching between "default" and "polygon" variants. The app now reads this variable to adjust theming and branding. [1] [2]Branding Components:
SecondaryLogocomponent 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]Theme and Color Updates:
Dependency Upgrades:
@walletconnect/core,@walletconnect/pos-client,@walletconnect/react-native-compat, and@walletconnect/sign-clientto version2.23.1-canary-init.6for improved compatibility and features. [1] [2]@walletconnectdependency entries inpackage-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.