chore: added network and count of the transactions, separated reusabl…#2621
Open
chore: added network and count of the transactions, separated reusabl…#2621
Conversation
…e logic Signed-off-by: Kolpic <galincho112@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2621 +/- ##
=======================================
Coverage 99.95% 99.95%
=======================================
Files 183 184 +1
Lines 7410 7446 +36
Branches 1478 1479 +1
=======================================
+ Hits 7407 7443 +36
Misses 3 3 🚀 New features to boost your workflow:
|
Signed-off-by: Kolpic <galincho112@gmail.com>
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.
Fixes #2520
Description:
What changed:
transactions.service.ts, or the additionalData payload. In-app notifications continue to receive exactly the same data they always did.New files:
network.ts— a shared helper buildNetworkBreakdown(notifications) that groups notifications by additionalData.network, normalizes labels via the existing getNetworkString, and returns an HTML fragment like 3 transactions on Mainnet, 1 transaction on Testnet.network.spec.ts— unit tests for the helper: empty input, missing networks, single-network with singular/plural, multi-network joining, sort order, mixed valid/invalid inputs.Rewritten template files:
All six transaction-related templates were rewritten to:
Each rewritten template:
Deletions in layout.ts:
buildEmailTransactionsList(the old helper that rendered the per-transaction HTML table).TransactionNotificationinterface (orphaned).emailCardTable,emailCardRow,emailWrapper,emailHeader,emailBody,emailFooter,emailWarning,emailReviewButton,escapeHtml,renderTransactionEmailLayout— still used byuser-registered.ts,reset-password.ts, and the rewritten templates.What the recipient sees: