feat: implement multi-currency support for donation notifications, summaries, and analytics#120
Closed
GBOYEE wants to merge 1 commit into
Closed
feat: implement multi-currency support for donation notifications, summaries, and analytics#120GBOYEE wants to merge 1 commit into
GBOYEE wants to merge 1 commit into
Conversation
Author
|
I'd like to work on this issue. I have background in devops and will submit a PR ASAP. |
1 similar comment
Author
|
I'd like to work on this issue. I have background in devops and will submit a PR ASAP. |
Collaborator
|
Resolve conflict |
…mmaries, and analytics - Add conversion metadata fields (baseCurrency, exchangeRate, convertedAmount, conversionTimestamp) to Donation model - Add currency index on Donation model for efficient filtering - Update notification service to accept and display correct currency (removes hardcoded XLM) - Update notification controller to pass currency from request body - Update email worker to pass currency through job data - Add currency filtering to donation queries (DonationFilters, donation controller, donation service) - Update analytics service to group donation/distribution totals by currency (byCurrency field) - Add currency to donation metadata in notifications - Update DonationInput type with optional conversion metadata fields - Add multi-currency test coverage for notification templates
2a40603 to
ef7b5bf
Compare
Author
|
Done — rebased on top of upstream/master and resolved the conflict. The branch is now clean and mergeable. Ready for review! |
Author
|
Closing — issue assigned to another contributor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #115
Summary
Implements full multi-currency support across the donation workflow. All changes are minimal and focused.
What changed
Prisma Schema (
prisma/schema.prisma):Donationmodel:baseCurrency,exchangeRate,convertedAmount,conversionTimestamp@@index([currency])for efficient currency-based filteringNotifications (
src/services/notification.service.ts):sendDonationReceivedNotificationnow acceptscurrencyparam (defaults toXLMfor backward compatibility) — displays e.g. "50 USDC" instead of always "XLM"sendDistributionSentNotification— same treatment{ amount, currency, campaignTitle }in metadataNotification Controller (
src/controllers/notification.controller.ts):currencyfrom request body through to notification serviceEmail Worker (
src/workers/email.worker.ts):currencythrough job data forDONATION_RECEIVEDandDISTRIBUTION_SENTjobsDonation Service (
src/services/donation.service.ts):baseCurrency,exchangeRate,convertedAmount,conversionTimestamp) when creating donationscurrencyfilter ingetDonationFiltersDonation Controller (
src/controllers/donation.controller.ts):currencyquery parameter supported on all donation list endpoints (list, my-donations, campaign-donations)Analytics Service (
src/services/analytics.service.ts):currency→ newbyCurrencyfieldcurrency→ newbyCurrencyfieldcurrency→ newbyCurrencyfieldTypes (
src/types/index.ts):DonationFiltersnow includes optionalcurrencyfieldDonationInputnow includes optional conversion metadata fieldsAcceptance Criteria