feat(rwallet): auto-load EncryptID wallet or demo EOA on page load
Instead of showing an empty form, rWallet now automatically detects and loads the user's EncryptID wallet address, or Vitalik.eth as a demo if not logged in. URL ?address= param still takes priority. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8efe18280c
commit
9f177147df
|
|
@ -141,6 +141,17 @@ class FolkWalletViewer extends HTMLElement {
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
this.address = params.get("address") || "";
|
this.address = params.get("address") || "";
|
||||||
this.checkAuthState();
|
this.checkAuthState();
|
||||||
|
|
||||||
|
// Auto-load: use session wallet, or fall back to demo EOA
|
||||||
|
if (!this.address) {
|
||||||
|
if (this.passKeyEOA) {
|
||||||
|
this.address = this.passKeyEOA;
|
||||||
|
} else {
|
||||||
|
// Demo EOA — Vitalik.eth
|
||||||
|
this.address = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.render();
|
this.render();
|
||||||
if (this.address) this.detectChains();
|
if (this.address) this.detectChains();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue