Closed ae2079 closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
giveth-dapps-v2 | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 8, 2024 5:03pm |
These changes enhance the donation flow by introducing new parameters useDonationBox
and relevantDonationTxHash
to various GraphQL mutations and functions. The updates aim to offer more flexibility and context when creating donations, especially focusing on whether a donation box is used and tracking relevant transaction hashes. The updates span multiple modules, including GraphQL mutations, React components, hooks, and service functions.
Files | Change Summary |
---|---|
src/apollo/gql/gqlDonations.ts |
Added useDonationBox and relevantDonationTxHash parameters to CREATE_DONATION and CREATE_DRAFT_DONATION mutations. |
src/components/views/donate/DonateModal.tsx |
Updated DonateModal component to include useDonationBox and relevantDonationTxHash based on conditions. |
src/components/views/donate/helpers.tsx |
Added useDonationBox property to ICreateDonation interface. |
src/hooks/useCreateEvmDonation.tsx |
Included useDonationBox parameter in various function calls and object assignments. Renamed useDonationBox to usingDonationBox in one call. |
src/hooks/useCreateSolanaDonation.tsx |
Added useDonationBox and relevantDonationTxHash parameters in the useCreateSolanaDonation function. |
src/services/donation.ts |
Updated createDonation function signature to include useDonationBox and relevantDonationTxHash parameters. |
sequenceDiagram
participant User
participant DonateModal
participant Hooks
participant GQL
participant Service
User->>+DonateModal: Open
DonateModal->>+Hooks: Use `useDonationBox` & `relevantDonationTxHash`
Hooks->>+GQL: Call CREATE_DONATION
GQL->>Service: Pass parameters
Service-->>GQL: Handle Donation
GQL-->>Hooks: Return Success
Hooks-->>DonateModal: Update UI
DonateModal-->>User: Display Info
In realms of code where functions flow,
New parameters help us grow.
A donation box, a hash to track,
Enhancing journeys, never looking back.
With these updates, we take flight,
Donations streamlined, shining bright. 🌟
src/components/views/donate/OnTime/DonateModal.tsx (2)
`211-211`: **LGTM!** The addition of the `useDonationBox` parameter to the `createFirstDonation` function call is correct and aligns with the PR objective. --- `227-228`: **LGTM!** The addition of the `useDonationBox` and `relevantDonationTxHash` parameters to the `createSecondDonation` function call is correct and aligns with the PR objective.
related to: https://github.com/Giveth/analytics-dashboard/issues/15
Summary by CodeRabbit
New Features
Enhancements
API Updates
CREATE_DONATION
andCREATE_DRAFT_DONATION
mutations withuseDonationBox
andrelevantDonationTxHash
parameters.