fix: relay reconnection, stale subscriptions, and UAT testnet switch#902
Open
dangershony wants to merge 3 commits into
Open
fix: relay reconnection, stale subscriptions, and UAT testnet switch#902dangershony wants to merge 3 commits into
dangershony wants to merge 3 commits into
Conversation
- Enable auto-reconnect on relay disconnect (ReconnectTimeout = 30s) - Replace stale EOSE tracking sets on repeated refresh calls - Dispose and recreate local event handlers on each refresh so the current callback receives events instead of a stale closure - Add DisposeLocalSubscription to tear down the local handler without sending a Nostr CLOSE (the same subscription key is re-used immediately)
- Dispatch ConfirmNetworkSwitchAsync to UI thread (thread affinity) - Poll-wait for WalletContext to clear after wipe (async void completion) - Flush UI jobs before reading SeedGroups after wallet creation - Improve diagnostic error message for wallet ID lookup failures
Default network is now Mainnet. All UAT tests must switch to Angornet after WipeDataAsync/WipeDataWithRecoveryPurgeAsync before creating wallets, otherwise wallet creation hits the mainnet indexer and fails.
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.
Problem
Three related issues causing UAT test failures:
1. Relay messages lost on refresh
When a Nostr relay disconnects, the app never reconnects (ReconnectTimeout was null). Subsequent refresh calls send REQ messages to dead WebSocket connections that silently fail. Additionally, repeated refresh calls hit stale subscription state:
This caused investor processes to never see founder approval signatures until restart.
2. Automation server thread safety
3. UAT tests assume Angornet
Default network changed to Mainnet. After WipeDataAsync, the persisted network resets to Mainnet. Tests that create wallets without switching to Angornet first hit the mainnet indexer and fail silently.
Fixes
Relay layer (Angor.Shared)
Automation layer (App)
UAT tests
Test Results