-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Fix: Update BTCPay Server currencies and fix dark mode bug #22887
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
Conversation
@TChukwuleta is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details:
|
|
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (08/04/25)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (08/04/25)1 label was added to this PR based on Keith Williams's automation. "Add ready-for-e2e label" took an action on this PR • (08/04/25)1 label was added to this PR based on Keith Williams's automation. |
WalkthroughThe changes update the user interface for entering a price in the EventTypeAppSettingsInterface component by restructuring the container layout, adding a visible label above the price input, and adjusting styling for dark mode compatibility and input width. Additionally, the currency options in the currencyOptions.ts module are expanded from a single USD entry to a comprehensive list of 27 currencies, with updated labels and inclusion of the Japanese Yen (JPY) as a zero-decimal currency. The zero-decimal currency logic is updated to recognize JPY, affecting currency conversion functions. Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Possibly related PRs
Note 🔌 MCP (Model Context Protocol) integration is now available in Early Access!Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/app-store/btcpayserver/components/EventTypeAppSettingsInterface.tsx
(1 hunks)packages/app-store/btcpayserver/lib/currencyOptions.ts
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.ts
📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
**/*.ts
: For Prisma queries, only select data you need; never useinclude
, always useselect
Ensure thecredential.key
field is never returned from tRPC endpoints or APIs
Files:
packages/app-store/btcpayserver/lib/currencyOptions.ts
**/*.{ts,tsx}
📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js
.utc()
in hot paths like loops
Files:
packages/app-store/btcpayserver/lib/currencyOptions.ts
packages/app-store/btcpayserver/components/EventTypeAppSettingsInterface.tsx
**/*.tsx
📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
Always use
t()
for text localization in frontend code; direct text embedding should trigger a warning
Files:
packages/app-store/btcpayserver/components/EventTypeAppSettingsInterface.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Tests / Unit
- GitHub Check: Type check / check-types
🔇 Additional comments (4)
packages/app-store/btcpayserver/lib/currencyOptions.ts (2)
32-32
: LGTM! JPY correctly classified as zero-decimal currency.Japanese Yen is properly classified as a zero-decimal currency, which aligns with standard financial practices where JPY amounts are expressed as whole numbers.
34-46
: LGTM! Currency conversion functions handle new currencies correctly.The conversion functions properly handle the expanded currency list, including the newly added JPY as a zero-decimal currency.
packages/app-store/btcpayserver/components/EventTypeAppSettingsInterface.tsx (2)
63-66
: LGTM! Improved accessibility and layout.The addition of an explicit label element with proper
htmlFor
attribute enhances accessibility for screen readers. Theinline-block
container andtext-default
class provide better layout and dark mode support, addressing the PR objective.
69-69
: LGTM! Dark mode visibility fix implemented correctly.The updated className with
text-black dark:text-white
properly addresses the dark mode visibility issue mentioned in the PR objectives, ensuring the price input text is visible in both light and dark themes.
E2E results are ready! |
What does this PR do?
Cal.com integration btcpayserver/btcpayserver#6715 (comment)
With this in dark mode the price label is now visible and the price input text is also visible.
Visual Demo (For contributors especially)
A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).
Mandatory Tasks (DO NOT REMOVE)
Checklist