Surface wallet session status in launcher control panel
This commit is contained in:
parent
42bccf5ed2
commit
26cdbeae38
@ -33,7 +33,7 @@ Top-level control surface:
|
||||
2. `Activate membership`
|
||||
3. `Refresh status + feed`
|
||||
4. `Governance status`
|
||||
5. Wallet/membership/designation/last-sync overview cards
|
||||
5. Wallet/session/membership/designation/last-sync overview cards
|
||||
6. Pull-first updates feed + support ticket action
|
||||
7. Identity assurance visibility (`none` / `crypto_direct_unattested` / `sponsored_unattested` / `onramp_attested`)
|
||||
|
||||
|
||||
11
app/app.js
11
app/app.js
@ -55,6 +55,16 @@ function isOnrampAttested(value) {
|
||||
return normalizeAssurance(value) === "onramp_attested";
|
||||
}
|
||||
|
||||
function sessionSummary() {
|
||||
if (!state.walletSessionToken) {
|
||||
return "none";
|
||||
}
|
||||
if (!state.walletSessionExpiresAt) {
|
||||
return "active";
|
||||
}
|
||||
return `active (exp ${state.walletSessionExpiresAt})`;
|
||||
}
|
||||
|
||||
function injectedProvider() {
|
||||
return globalThis.ethereum || null;
|
||||
}
|
||||
@ -105,6 +115,7 @@ function refreshActionLocks(statusPayload) {
|
||||
function refreshOverview(statusPayload) {
|
||||
const currentWallet = wallet();
|
||||
setSummary("summaryWallet", currentWallet || "not connected");
|
||||
setSummary("summarySession", sessionSummary());
|
||||
if (statusPayload && typeof statusPayload === "object") {
|
||||
setSummary("summaryMembership", statusPayload.status || "unknown");
|
||||
setSummary("summaryDesignation", statusPayload.designation_code || "-");
|
||||
|
||||
@ -27,6 +27,10 @@
|
||||
<h3>Wallet</h3>
|
||||
<p id="summaryWallet">not connected</p>
|
||||
</article>
|
||||
<article class="stat">
|
||||
<h3>Session</h3>
|
||||
<p id="summarySession">none</p>
|
||||
</article>
|
||||
<article class="stat">
|
||||
<h3>Membership</h3>
|
||||
<p id="summaryMembership">unknown</p>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user