From 547bff0d05c333c93c3829de17ba77de206f83f8 Mon Sep 17 00:00:00 2001 From: martbost Date: Fri, 4 Sep 2026 15:27:08 -0500 Subject: [PATCH] Fix: email-only members were locked out of the members area refreshNavWallet assumed every signed-in session has a wallet address and threw on null for email-only members; the catch returned null and render() treated the member as signed out even though the session and cookie were valid. Nav now shows the email (or member badge) when no wallet is linked. Verified with a full browser cycle: session landing, logout, fresh code sign-in. Assets v=20260904k. Co-Authored-By: Claude Fable 5 --- public/assets/common.js | 7 +++++-- public/contract.html | 8 ++++---- public/index.html | 10 +++++----- public/ledger.html | 8 ++++---- public/my.html | 10 +++++----- 5 files changed, 23 insertions(+), 20 deletions(-) diff --git a/public/assets/common.js b/public/assets/common.js index 8f70aa2..3fe6f99 100644 --- a/public/assets/common.js +++ b/public/assets/common.js @@ -52,8 +52,11 @@ window.IAP = (function () { const el = $('navWallet'); if (!el) return; if (me.signedIn) { - el.innerHTML = (me.memberId ? 'member #' + me.memberId + ' ' : '') - + '' + me.address.slice(0, 6) + '…' + me.address.slice(-4) + ''; + // email-only members have no wallet address yet + const who = me.address + ? '' + me.address.slice(0, 6) + '…' + me.address.slice(-4) + '' + : (me.email ? String(me.email).replace(/[&<>]/g, '') : 'signed in'); + el.innerHTML = (me.memberId ? 'member #' + me.memberId + ' ' : '') + who; } else { el.innerHTML = 'Sign in'; } diff --git a/public/contract.html b/public/contract.html index 4e825d9..98aa52d 100644 --- a/public/contract.html +++ b/public/contract.html @@ -5,7 +5,7 @@ The contract | InstantAdPay - +
@@ -129,8 +129,8 @@
Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never spend what you cannot afford.
- - - + + + diff --git a/public/index.html b/public/index.html index 042539e..1295f20 100644 --- a/public/index.html +++ b/public/index.html @@ -5,7 +5,7 @@ InstantAdPay: advertise and earn, locked in code - + @@ -398,9 +398,9 @@ - - - - + + + + diff --git a/public/ledger.html b/public/ledger.html index 851cc2b..9fea010 100644 --- a/public/ledger.html +++ b/public/ledger.html @@ -5,7 +5,7 @@ Live ledger | InstantAdPay - +
@@ -25,8 +25,8 @@
InstantAdPay · how it works · contract source ↗
- - - + + + diff --git a/public/my.html b/public/my.html index 876193a..2c9d023 100644 --- a/public/my.html +++ b/public/my.html @@ -4,7 +4,7 @@ My account | InstantAdPay - +
@@ -160,9 +160,9 @@
- - - - + + + +