Repository navigation
Fix wallet-connect polling race and implement subscription storage I/O - #1218
Merged
Kingsman-99 merged 1 commit intoNov 26, 2026
Merged
Conversation
Stellar-split#1140: Verified InvoiceCard.tsx and InvoiceCard.test.tsx against each other line by line — invoice id, status badge, truncated addresses, funded amount text, FundingProgress, displayNumber, and DeadlineCountdown gating all already match the test's expectations exactly. No bug found, no change made. Closes Stellar-split#1140. Stellar-split#1141: QRModal.tsx had two redundant polling useEffects both watching wallet-connect status, and the primary one fired an immediate isWalletConnected() check synchronously on mount instead of waiting for the first pollingInterval tick. This made the component call onConnected before the interval elapsed, breaking any caller relying on pollingInterval as a minimum delay (e.g. a 500ms poll firing before 400ms had passed). Removed the duplicate second effect entirely and changed the first effect to schedule its first check via setTimeout(check, pollingInterval) rather than invoking it immediately, so the very first wallet check now also respects the configured delay. Closes Stellar-split#1141. Stellar-split#1142: SubscriptionDetailClient.test.tsx seeds localStorage with a subscription under the "stellar_split_subscriptions" key, but src/lib/subscriptions.ts's loadSubscriptions() and saveSubscriptions() were both complete no-op stubs — loadSubscriptions always returned an empty array and saveSubscriptions never wrote anything — so the detail page could never find the seeded subscription and always rendered the "Subscription not found" error state. Implemented both functions for real: loadSubscriptions reads and JSON-parses the localStorage array, reviving bigint fields (recipient amounts, totalUsdcCollected, invoice history amounts) from their serialized string form, with an optional creator-publicKey filter matching the existing call site in analytics/page.tsx; saveSubscriptions serializes bigints back to strings and writes the array back. Closes Stellar-split#1142. Stellar-split#1143: Verified SubscriptionCard.tsx against SubscriptionCard.test.tsx — status labels, frequency, next-run dash-when-paused, invoice count, detail-page link, and USDC formatting (including the 0/partial-decimal/large-amount cases) all already match, since formatSubscriptionForDisplay (unlike loadSubscriptions/saveSubscriptions) was already a real implementation, not a stub. No bug found, no change made. Closes Stellar-split#1143.
|
@Joel234-png is attempting to deploy a commit to the kingsman-99's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
#1140: Verified InvoiceCard.tsx and InvoiceCard.test.tsx against each other line by line — invoice id, status badge, truncated addresses, funded amount text, FundingProgress, displayNumber, and DeadlineCountdown gating all already match the test's expectations exactly. No bug found, no change made. Closes #1140
#1141: QRModal.tsx had two redundant polling useEffects both watching wallet-connect status, and the primary one fired an immediate isWalletConnected() check synchronously on mount instead of waiting for the first pollingInterval tick. This made the component call onConnected before the interval elapsed, breaking any caller relying on pollingInterval as a minimum delay (e.g. a 500ms poll firing before 400ms had passed). Removed the duplicate second effect entirely and changed the first effect to schedule its first check via setTimeout(check, pollingInterval) rather than invoking it immediately, so the very first wallet check now also respects the configured delay. Closes #1141
#1142: SubscriptionDetailClient.test.tsx seeds localStorage with a subscription under the "stellar_split_subscriptions" key, but src/lib/subscriptions.ts's loadSubscriptions() and saveSubscriptions() were both complete no-op stubs — loadSubscriptions always returned an empty array and saveSubscriptions never wrote anything — so the detail page could never find the seeded subscription and always rendered the "Subscription not found" error state. Implemented both functions for real: loadSubscriptions reads and JSON-parses the localStorage array, reviving bigint fields (recipient amounts, totalUsdcCollected, invoice history amounts) from their serialized string form, with an optional creator-publicKey filter matching the existing call site in analytics/page.tsx; saveSubscriptions serializes bigints back to strings and writes the array back. Closes #1142
#1143: Verified SubscriptionCard.tsx against SubscriptionCard.test.tsx — status labels, frequency, next-run dash-when-paused, invoice count, detail-page link, and USDC formatting (including the 0/partial-decimal/large-amount cases) all already match, since formatSubscriptionForDisplay (unlike loadSubscriptions/saveSubscriptions) was already a real implementation, not a stub. No bug found, no change made. Closes #1143