WIP: TFChain WebSocket auto-reconnect and health endpoint #13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/tfchain-reconnect"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Arc<RwLock<Client>>with background health check every 30s, automatic reconnect on failureGET /api/healthreturns chain status, network, latest block number (or 503 if disconnected)e2e/tests/helpers/login.tsto eliminate duplication across 3 test filesTest Status
Files Changed
Backend (reconnect + health):
crates/backend/Cargo.toml— tokio sync+time featurescrates/backend/src/state.rs—Arc<RwLock<Client>>,check_chain_health(),reconnect()crates/backend/src/api.rs— read locks on all handlers, API clone for submits,health_checkendpointcrates/backend/src/main.rs— background health task,/api/healthrouteSmoke tests:
scripts/smoke-test.sh— 11 new tests (health, balance numerics, transfer prepare fields/errors)E2E tests:
e2e/tests/helpers/login.ts— shared login helper (new)e2e/tests/post-login-data.spec.ts— 7 data verification tests (new)e2e/tests/wallet-connect.spec.ts— refactored to use helpere2e/tests/vault-flow.spec.ts— refactored to use helperCloses #12
🤖 Generated with Claude Code
Pull request closed