IntersectMBO / IntersectMBO/govtool

🐛 Intermittent Wallet Reconnection Failure (spinner never completes)

Open
#4,048 0 comments 0 reactions 0 assignees View on GitHub
🎁 Wrapper 🐛 Bug
Dominant language
HTML
Stars
21
Forks
29
Avg merge
2d 22h
Merged PRs (30d)
7

Description

### Area

Wrapper

### Domain

gov.tools

### Which wallet were you using?

_No response_

### Context

Across **preview**, **preprod**, and **mainnet** on gov.tools, returning users sometimes cannot reconnect their wallet after previously being connected. Issue appears across wallets but is most prominent with **Eternl**. Behavior suggests a problem in the **GovTool wallet connector** (stale session/provider handle, race on init) or a missing **initial delay/retry** before attempting reconnection.

### Notes / Hypotheses
- Likely stale provider/session reference after tab close; connector tries to reuse an invalid handle.
- Possible **race condition** between dApp connector initialization and UI connect action.
- Add **initialization backoff** / **retry** and ensure provider readiness checks before invoking `enable()`/connect.
- Consider clearing stale session flags when connection fails and surfacing an actionable error to the user.

### Environment
- Sites: preview, preprod, mainnet
- Wallets: multiple; **Eternl** most commonly reported
- Workaround: Sometimes hard refresh helps; often **does not**.

### Steps to reproduce

1. Open gov.tools (any of preview / preprod / mainnet).
2. Connect a wallet (Eternl most commonly affected).
3. Use the app normally.
4. Close the browser tab.
5. Later, return to gov.tools.
6. Attempt to reconnect (either auto-reconnect or click **Connect** and choose the same wallet).

### Actual behavior

- The connect modal shows the selected wallet with a **spinning loader** that **never completes**.
- In some sessions a **hard refresh** resolves it; in others, it **never connects** again for that wallet until further manual intervention.
- User is effectively locked out from connecting with that wallet instance.

### Expected behavior

- Previously connected wallets should **auto-reconnect** or **connect reliably** on user action.
- The connect flow should **complete** or **fail with a clear error** and a retry path, not stall indefinitely.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.