hd-wallet-ui 2.0.18 → 2.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hd-wallet-ui",
3
- "version": "2.0.18",
3
+ "version": "2.0.19",
4
4
  "description": "HD Wallet modal UI — login, keys, identity, trust map, and security bond. Attach to any button in your app.",
5
5
  "type": "module",
6
6
  "main": "src/app.js",
@@ -40,7 +40,7 @@
40
40
  "buffer": "^6.0.3",
41
41
  "flatbuffers": "^25.9.23",
42
42
  "flatc-wasm": "^26.1.32",
43
- "hd-wallet-wasm": "^2.0.18",
43
+ "hd-wallet-wasm": "^2.0.19",
44
44
  "qrcode": "^1.5.3",
45
45
  "spacedatastandards.org": "^1.93.3",
46
46
  "vcard-cryptoperson": "^1.1.11"
package/src/app.js CHANGED
@@ -2596,6 +2596,36 @@ async function generatePKIKeyPairs() {
2596
2596
  // Login / Logout
2597
2597
  // =============================================================================
2598
2598
 
2599
+ function hideStoredWalletLoginUI() {
2600
+ const storedTab = $('stored-tab');
2601
+ if (storedTab) storedTab.style.display = 'none';
2602
+
2603
+ const pinSect = $('stored-pin-section');
2604
+ if (pinSect) pinSect.style.display = 'block';
2605
+
2606
+ const psSect = $('stored-passkey-section');
2607
+ if (psSect) psSect.style.display = 'none';
2608
+
2609
+ const divider = $('stored-divider');
2610
+ if (divider) divider.style.display = 'none';
2611
+
2612
+ const dateEl = $('stored-wallet-date');
2613
+ if (dateEl) dateEl.textContent = '';
2614
+
2615
+ const unlockPin = $('pin-input-unlock');
2616
+ if (unlockPin) unlockPin.value = '';
2617
+
2618
+ const unlockBtn = $('unlock-stored-wallet');
2619
+ if (unlockBtn) unlockBtn.disabled = true;
2620
+
2621
+ $qa('.method-tab').forEach(t => t.classList.remove('active'));
2622
+ $qa('.method-content').forEach(c => c.classList.remove('active'));
2623
+ const pwMethod = $('password-method');
2624
+ if (pwMethod) pwMethod.classList.add('active');
2625
+ const pwTab = $q('.method-tab[data-method="password"]');
2626
+ if (pwTab) pwTab.classList.add('active');
2627
+ }
2628
+
2599
2629
  function login(keys) {
2600
2630
  state.loggedIn = true;
2601
2631
  state.wallet = keys;
@@ -2786,7 +2816,10 @@ function logout() {
2786
2816
  state.masterSeed = null;
2787
2817
  state.hdRoot = null;
2788
2818
  state.mnemonic = null;
2819
+ state.addresses = { btc: null, eth: null, sol: null };
2789
2820
 
2821
+ WalletStorage.clearStorage();
2822
+ hideStoredWalletLoginUI();
2790
2823
  localStorage.removeItem(PKI_STORAGE_KEY);
2791
2824
 
2792
2825
  // Update hero stats
@@ -2823,6 +2856,9 @@ function logout() {
2823
2856
  // Clear HD wallet UI
2824
2857
  const derivedResult = $('derived-result');
2825
2858
  if (derivedResult) derivedResult.style.display = 'none';
2859
+
2860
+ $('login-modal')?.classList.remove('active');
2861
+ $('keys-modal')?.classList.remove('active');
2826
2862
  }
2827
2863
 
2828
2864
  // =============================================================================
@@ -695,6 +695,9 @@ export function clearStorage() {
695
695
  localStorage.removeItem(METADATA_KEY);
696
696
  localStorage.removeItem(ENCRYPTED_DATA_KEY);
697
697
  localStorage.removeItem(PASSKEY_CREDENTIAL_KEY);
698
+ localStorage.removeItem('encrypted_wallet');
699
+ localStorage.removeItem('passkey_credential');
700
+ localStorage.removeItem('passkey_wallet');
698
701
  }
699
702
 
700
703
  /**