Summary
Add an admin-only auth gate in front of a new admin dashboard route: connect a wallet, read the vault contract's get_admin(), and only render the dashboard if the connected wallet's public key matches. Otherwise show a clear blocked state, not a silent redirect.
Screenshots
Connect state:
Blocked state:
Motivation
The vault's admin currently has no UI for operational visibility (keeper health, vault state, recent admin actions), only stellar contract invoke calls or digging through GitHub Actions logs. This is the foundational piece the rest of the dashboard depends on.
Proposed Solution
- New route, e.g.
/admin.
- On mount: if no wallet connected, show the "Admin access" connect screen (see Screenshots above).
- On connect: read
get_admin() for the vault contract (needs a small off-chain reader added to coordinator.ts, mirroring the existing read-only helpers there) and compare against the connected publicKey.
- Match: render the dashboard (built in the follow-up issues).
- Mismatch: show the "Not authorized" blocked screen (see Screenshots above), which shows only the connected wallet's address, not the real admin address, deliberately, so the page doesn't hand out a ready-made phishing target to every unauthorized visitor.
- Re-check on wallet change/disconnect, matching the pattern
useWalletStore's revalidate() already uses elsewhere.
Scope
| Field |
Value |
| Area |
Frontend, SDK |
| Protocol affected |
None |
| Network |
Both |
| Breaking change? |
No |
Acceptance Criteria
Additional Context
First of three admin-dashboard issues (auth gate, then observability panels, then the admin action history feed). Design reviewed and approved before filing; screenshots above.
Summary
Add an admin-only auth gate in front of a new admin dashboard route: connect a wallet, read the vault contract's
get_admin(), and only render the dashboard if the connected wallet's public key matches. Otherwise show a clear blocked state, not a silent redirect.Screenshots
Connect state:
Blocked state:
Motivation
The vault's admin currently has no UI for operational visibility (keeper health, vault state, recent admin actions), only
stellar contract invokecalls or digging through GitHub Actions logs. This is the foundational piece the rest of the dashboard depends on.Proposed Solution
/admin.get_admin()for the vault contract (needs a small off-chain reader added tocoordinator.ts, mirroring the existing read-only helpers there) and compare against the connectedpublicKey.useWalletStore'srevalidate()already uses elsewhere.Scope
Acceptance Criteria
/adminrenders the connect screen when no wallet is connected/adminrenders the blocked screen when the connected wallet doesn't matchget_admin(), showing only the connected wallet's address/adminrenders the dashboard shell when the connected wallet matches#0d1117/#161b22panel colors,border-gray-800, emerald accent), screenshots above show the exact spacing/colors expectedAdditional Context
First of three admin-dashboard issues (auth gate, then observability panels, then the admin action history feed). Design reviewed and approved before filing; screenshots above.