-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Main #4340
Conversation
fix typo giv-earth round
Estimated matching range
fix: remove estimated matching range
…oject creation flow #4236
Add new QF banner
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe recent updates focus on refining user interface text for clarity and functionality across multiple language files, enhancing Ethereum donation settings, modifying various project-related components for improved currency formatting, and upgrading the Changes
Poem
Recent review detailsConfiguration used: CodeRabbit UI Files ignored due to path filters (1)
Files selected for processing (12)
Files skipped from review due to trivial changes (4)
Additional context usedBiome
Additional comments not posted (8)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration 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
Outside diff range and nitpick comments (2)
src/helpers/number.ts (1)
Line range hint
73-73
: UseNumber.isNaN
instead ofisNaN
for type safety.The global
isNaN
function coerces its argument to a number, which can lead to unexpected results. UsingNumber.isNaN
provides a safer alternative that does not perform type coercion.- if (isNaN(number)) { + if (Number.isNaN(number)) {src/helpers/qf.ts (1)
Line range hint
44-44
: Optimize mathematical expressions using the exponentiation operator.The use of
Math.pow
can be replaced with the exponentiation operator (**
) for clarity and to align with modern JavaScript best practices.- const result = Math.min( - (Math.pow(projectDonationsSqrtRootSum, 2) / allProjectsSum) * matchingPool, - matchingPool * matchingCapPercentage, - ); + const result = Math.min( + ((projectDonationsSqrtRootSum ** 2) / allProjectsSum) * matchingPool, + matchingPool * matchingCapPercentage, + ); - const beforeNewDonationPow = Math.pow(_projectDonationsSqrtRootSum, 2); - const afterNewDonationPow = Math.pow( - _projectDonationsSqrtRootSum + Math.sqrt(donationAmount), - 2, - ); + const beforeNewDonationPow = _projectDonationsSqrtRootSum ** 2; + const afterNewDonationPow = (_projectDonationsSqrtRootSum + Math.sqrt(donationAmount)) ** 2;Also applies to: 61-61, 62-65
@@ -60,7 +60,7 @@ export const formatDonation = ( | |||
if (num < threshold) return `< ${symbol}${threshold}`; | |||
return !rounded | |||
? symbol + num.toLocaleString(local, { maximumFractionDigits }) | |||
: symbol + Math.round(num); | |||
: symbol + Math.round(num).toLocaleString(local); |
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.
Consider using the exponentiation operator for clarity and modern JavaScript syntax.
The use of Math.pow
can be replaced with the exponentiation operator (**
) for improved readability and to align with modern JavaScript practices.
- const threshold = Math.pow(10, -maximumFractionDigits);
+ const threshold = 10 ** -maximumFractionDigits;
Committable suggestion was skipped due to low confidence.
Summary by CodeRabbit
New Features
Bug Fixes
Improvements
Version