OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-wallet-desktop commits / 7d783a8

Fix: prevent address selector cascade, preserve unified view on address change
Deployment: testing (hyper-wallet-desktop-test) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
7d783a8d47e9fb578c6a5c5b270a77a96f7d15b4
by plankatron <fleeky@gmail.com> · 2026-01-30T02:25:14.000Z

Changed files (2) +22 -4

.claude/deployment-history.json +2 -2
……@@ -4,7 +4,7 @@
44 "branch": "testing",
55 "version": "unknown",
66 "pear_key": "pear://unknown",
7 "deployed_at": "2026-01-29T21:17:21-05:00",
8 "commit_message": "Fix selectAsset click handler - remove undefined event reference",
7 "deployed_at": "2026-01-29T21:21:51-05:00",
8 "commit_message": "Fix: tokens share ETH address - don't reload address selector for USDT/USDC",
99 "tmux": "pear-seed:5"
1010}
desktop/wallet.js +20 -2
……@@ -1625,8 +1625,14 @@ function updateWalletView() {
16251625}
16261626
16271627// Load wallet addresses into the selector dropdown
1628// Flag to prevent onchange cascade when programmatically updating selector
1629let isUpdatingAddressSelector = false
1630
16281631async function loadWalletAddressSelector() {
16291632 const select = document.getElementById('wallet-address-select')
1633
1634 // Set flag to prevent onchange from firing during programmatic update
1635 isUpdatingAddressSelector = true
16301636 select.innerHTML = '<option value="">Loading...</option>'
16311637
16321638 try {
……@@ -1637,11 +1643,13 @@ async function loadWalletAddressSelector() {
16371643
16381644 if (data.error) {
16391645 select.innerHTML = '<option value="">Error loading addresses</option>'
1646 isUpdatingAddressSelector = false
16401647 return
16411648 }
16421649
16431650 if (data.addresses.length === 0) {
16441651 select.innerHTML = '<option value="">No addresses yet</option>'
1652 isUpdatingAddressSelector = false
16451653 return
16461654 }
16471655
……@@ -1661,10 +1669,16 @@ async function loadWalletAddressSelector() {
16611669 console.error('Load address selector error:', err)
16621670 select.innerHTML = '<option value="">Failed to load</option>'
16631671 }
1672
1673 // Clear flag after a tick to allow DOM to settle
1674 setTimeout(() => { isUpdatingAddressSelector = false }, 0)
16641675}
16651676
16661677// Handle wallet address selector change
16671678async function onWalletAddressChange() {
1679 // Ignore programmatic updates to prevent cascade
1680 if (isUpdatingAddressSelector) return
1681
16681682 const select = document.getElementById('wallet-address-select')
16691683 const selectedIndex = parseInt(select.value)
16701684
……@@ -1686,8 +1700,12 @@ async function onWalletAddressChange() {
16861700
16871701 showSuccess('Wallet address changed!')
16881702
1689 // Reload balance, QR code, and transactions
1690 await loadCurrentBalance()
1703 // Reload balance - use unified view for Ethereum, standard for others
1704 if (selectedChain === 'ethereum') {
1705 await loadEthereumBalances()
1706 } else {
1707 await loadCurrentBalance()
1708 }
16911709 await loadCurrentQRCode()
16921710 await loadTransactions()
16931711