[Frontend] Add a network mismatch banner and disable signing actions
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- authentication, frontend
Research direction
Start by reading wallet state in apps/web/src/store/wallet.ts, the connect flow in apps/web/src/lib/wallet.ts, and network constants in packages/shared/src/constants.ts. Trace where deposit, withdraw, and admin signing actions are enabled, then check the existing localized wallet messages. Done means the banner and action states meet the listed network cases, component tests cover matching, mismatched, and unknown states, and lint and typecheck pass.
Written by the indexing model from the issue text.
Description
Summary
The app does not warn when a connected wallet is on a different Stellar network than the app configuration. A user can reach a signing step that will fail or target the wrong network.
Motivation
A clear mismatch banner prevents a confusing wallet error and reduces the chance that a user signs a transaction for the wrong network. Disabling the action until the networks match is safer than letting the wallet reject it later.
Proposed Solution
Compare the wallet's reported network passphrase with the app network configuration. When they differ, show a persistent banner with the expected and detected networks and disable deposit, withdraw, and admin signing actions. Keep read-only data visible. Add a retry after the user switches networks. Cover matching, mismatched, and unknown network states with component tests.
Scope
| Field | Value |
|---|---|
| Area | Frontend |
| Protocol affected | None |
| Network | testnet and mainnet |
| Breaking change? | No |
Alternatives Considered
Letting the wallet reject the transaction is simpler but produces a late, wallet-specific error. A blocking modal is more disruptive than a banner and does not help a user who only wants to read the dashboard.
Acceptance Criteria
- A mismatch shows the expected and detected network
- Signing actions are disabled while the networks differ
- Read-only data remains visible
- The banner clears after the wallet switches networks
- Component tests cover matching, mismatched, and unknown states
-
pnpm lintandpnpm typecheckpass
Additional Context
Wallet state is in apps/web/src/store/wallet.ts and the connect flow is in apps/web/src/lib/wallet.ts. The app network constants are in packages/shared/src/constants.ts. Existing wallet error messages are localized under apps/web/src/locales.
- Dominant language
- TypeScript
- Stars
- 17
- Forks
- 129
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 54
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from drydocs/meridian
-
chore
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
drydocs/meridian#1503 · 1 comment ·
Maintainers usually reply within 2 days
-
[Docs] Add a supported wallet capability matrixPossibly taken @Joeljosef7 claimed this 3 days ago. Opendocs frontend Stellar Wave trivial
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
drydocs/meridian#1349 · 6 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Test] Add cross-language conformance vectors for vault mathPossibly taken @VeronicDev claimed this 3 days ago. Opencontracts medium sdk Stellar Wave testing
drydocs/meridian#1444 · 5 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Security] Extend CSP and security headers to landing and docs routesPossibly taken @anietie234 claimed this 3 days ago. Openapi frontend medium security Stellar Wave
drydocs/meridian#1443 · 5 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Docs] Establish ADRs and backfill architecture decisionsPossibly taken @Sammydz456 claimed this 3 days ago. Opendocs medium Stellar Wave
drydocs/meridian#1442 · 5 comments · 1 assignee ·
Maintainers usually reply within 2 days
All issues in drydocs/meridian
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
External sources always come back in English: `lc` isn't passed to `/api/v3/external_sources`Possibly taken @Anurag1428 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
openfoodfacts/openfoodfacts-explorer#2264 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
cloudflare/workers-sdk#17139 ·
Maintainers usually reply within 1 day
-
area: editor P3 type: feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
halisonworks/mod-codeling#290 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
colinhacks/zod#6776 ·
Maintainers usually reply within 1 day