react-native-examples
react-native-examples copied to clipboard
chore: pos variant
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_VARIANTto.env.exampleto 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
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] - 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-clientto version2.23.1-canary-init.6for improved compatibility and features. [1] [2] - Cleaned up and removed old or redundant
@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.