-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
quadratic funding toast on donate success page #4820
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,10 +157,7 @@ const DonateIndex: FC = () => { | |
|
||
if (!transactionId) return; | ||
const includeInQF = | ||
activeStartedRound && | ||
!!getDonationById.valueUsd && | ||
getDonationById.valueUsd >= | ||
(activeStartedRound?.minimumValidUsdValue || 0); | ||
activeStartedRound && !!getDonationById.valueUsd; | ||
setSuccessDonation({ | ||
Comment on lines
+160
to
161
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Potential Issue: Inclusion Criteria for Quadratic Funding Eligibility May Have Changed The updated condition for const includeInQF =
activeStartedRound && !!getDonationById.valueUsd; Previously, the condition might have included a check against a minimum donation amount to qualify for Quadratic Funding (QF). By only verifying the presence of If the intention is to include only donations above a certain minimum value, consider updating the condition accordingly. For example: const includeInQF =
activeStartedRound && !!getDonationById.valueUsd
+ && getDonationById.valueUsd >= GIVBACKS_DONATION_QUALIFICATION_VALUE_USD; This ensures that only donations meeting the minimum USD value qualify for QF inclusion. |
||
txHash: [ | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,10 +138,7 @@ const DonateModal: FC<IDonateModalProps> = props => { | |
formatUnits(amount, token.decimals), | ||
token.decimals, | ||
) || 0); | ||
const includeInQF = | ||
activeStartedRound && | ||
isOnEligibleNetworks && | ||
donationUsdValue >= (activeStartedRound.minimumValidUsdValue || 0); | ||
const includeInQF = activeStartedRound && isOnEligibleNetworks; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Simplified QF inclusion logic - Please clarify the criteria The condition for including a donation in the Quadratic Funding (QF) round has been simplified, which improves code readability. However, this change raises a few points:
Consider adding a comment explaining the criteria for including donations in QF. If a minimum threshold is needed, you could modify the line as follows: const includeInQF = activeStartedRound && isOnEligibleNetworks && donationUsdValue >= MINIMUM_QF_THRESHOLD; Where |
||
const chainvineReferred = getWithExpiry(StorageLabel.CHAINVINEREFERRED); | ||
const { title, addresses } = project || {}; | ||
|
||
|
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.
💡 Codebase verification
Issue Detected: Server-Side Implementation Missing
The
minimumValidUsdValue
field is added to theQF_ROUNDS_QUERY
on the client side but does not appear to be defined in the GraphQL schema or resolvers. This discrepancy can lead to runtime errors and data inconsistencies.Actions Needed:
minimumValidUsdValue
in the GraphQL schema.🔗 Analysis chain
LGTM. Please provide additional context.
The addition of the
minimumValidUsdValue
field to theQF_ROUNDS_QUERY
looks good. This change appears to be related to implementing a minimum donation amount in USD for Quadratic Funding rounds.To ensure completeness:
Let's verify if there are any client-side changes related to this new field:
[/run_scripts]
[/run_scripts]
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 941
Script:
Length of output: 119
Script:
Length of output: 255