Repository navigation
feat: implement invoice versioning, payment analytics, contract ABI cache, and collaboration - #1151
Merged
Kingsman-99 merged 2 commits intoOct 19, 2026
Conversation
…ache, and collaboration (Stellar-split#1053, Stellar-split#1054, Stellar-split#1055, Stellar-split#1056) - Support invoice versioning with change tracking, safe rollback, and history auditing (Stellar-split#1056) - Add payment analytics with volume aggregation, payer cohorts, and visualizations (Stellar-split#1055) - Implement smart contract ABI caching with pluggable storage, fetchers, and invalidation (Stellar-split#1054) - Add invoice collaboration features with threaded comments, approvals, and notifications (Stellar-split#1053)
|
@maztah1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
5 tasks
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.
What this fixes
What changed
src/invoiceVersioning.ts,src/invoiceVersionTracker.ts):InvoiceVersionManagerand enhancedInvoiceVersionTrackerwith immutable snapshots and SHA-256 integrity checksums (computeChecksum).isRollbackSafe()androllback()with safeguards protecting finalized invoices (Released/Refunded) and options to preserve recorded payments and funded state.getChangeLog) and JSON export/import (exportHistoryJson,importHistoryJson).InvoiceVersionNotFoundError,UnsafeRollbackError, andInvalidVersionError.src/paymentAnalytics.ts):PaymentAnalyticsEngineproviding aggregation across invoices, payments, tokens, and statuses.aggregatePayers).aggregateTimeSeries).analyzeInvoicePerformance).formatReport,exportJson,exportCsv).renderAsciiBarChart), sparklines (renderSparkline), volume charts, status distribution charts, and structured data export (exportChartData) compatible with Chart.js and Recharts.src/abiCache.ts):ContractAbiCachewith transparent fetch-and-cache mechanics.MemoryAbiStorage(with sub-millisecond monotonic sequence LRU eviction and byte-size capacity budgeting) andAdapterAbiStorage(backed by persistent Web Storage /MemoryStorageAdapter).StaticContractAbiFetcher(registry-based) andRpcContractAbiFetcher(Soroban RPC-based).invalidate), by WASM bytecode hash (invalidateByWasmHash), by predicate (invalidateMatching), and by TTL expiry (invalidateExpired).AbiFetchErrorandAbiNotFoundError.src/invoiceCollaboration.ts):InvoiceCollaborationManagerwith threaded discussion comments, nested reply hierarchy trees (getThreadedComments), and@mentionextraction.requestApproval,submitDecision,getApprovalStatus) with configurable quorum thresholds and automatic state transitions.getNotifications,markNotificationAsRead) and pluggable notification handlers.CollaborationError,CommentNotFoundError,ApprovalRequestNotFoundError, andUnauthorizedCollaborationError.src/index.ts):Testing
test/invoiceVersioning.test.ts(9 tests passed)test/paymentAnalytics.test.ts(9 tests passed)test/abiCache.test.ts(10 tests passed)test/invoiceCollaboration.test.ts(10 tests passed)test/invoiceVersionTracker.test.ts(22 tests passed)test/sdkExports.test.ts(7 tests passed)test/client.test.ts(68 tests passed)test/retryPolicy.test.ts(31 tests passed)test/network-environment.test.ts(11 tests passed)tsc --noEmit), with zero errors in all new and modified files.Issues
closes #1056
closes #1055
closes #1054
closes #1053