OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-wallet-desktop commits / e9a6f9b

Fix: make notifications non-blocking to prevent UI hang
Deployment: testing (hyper-wallet-desktop-test) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
e9a6f9bfc7aa4edad99687361f5ccb88b946a0e9
by plankatron <fleeky@gmail.com> · 2026-01-30T03:09:16.000Z

Changed files (2) +38 -35

.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:57:08-05:00",
8 "commit_message": "Fix: show token amount + ETH gas in Total display for token transfers",
7 "deployed_at": "2026-01-29T22:03:04-05:00",
8 "commit_message": "Fix: use current account index for token transfers and add testnet contract fallbacks",
99 "tmux": "pear-seed:5"
1010}
desktop/wallet.js +36 -33
……@@ -3813,42 +3813,45 @@ function showNotification(title, body, type = 'info') {
38133813 // Always log to console (primary notification method)
38143814 console.log(`📢 Notification: ${title} - ${body}`)
38153815
3816 // Try to show native notification, but don't crash if it fails
3817 try {
3818 // Check if Notification API is available
3819 if ('Notification' in window) {
3820 // Request permission if not already granted
3821 if (Notification.permission === 'granted') {
3822 new Notification(title, {
3823 body: body,
3824 icon: '/assets/icon.png', // Add app icon if available
3825 badge: '/assets/badge.png'
3826 })
3827 } else if (Notification.permission !== 'denied') {
3828 Notification.requestPermission().then(permission => {
3829 if (permission === 'granted') {
3830 try {
3831 new Notification(title, {
3832 body: body,
3833 icon: '/assets/icon.png',
3834 badge: '/assets/badge.png'
3835 })
3836 } catch (err) {
3837 // Silently fail - notification not critical
3838 console.log('📢 Native notification unavailable (not critical)')
3816 // Run notification in a separate task to avoid blocking UI
3817 // Wrap everything in setTimeout(0) to make it non-blocking
3818 setTimeout(() => {
3819 try {
3820 // Check if Notification API is available
3821 if ('Notification' in window) {
3822 // Request permission if not already granted
3823 if (Notification.permission === 'granted') {
3824 new Notification(title, {
3825 body: body,
3826 icon: '/assets/icon.png', // Add app icon if available
3827 badge: '/assets/badge.png'
3828 })
3829 } else if (Notification.permission !== 'denied') {
3830 Notification.requestPermission().then(permission => {
3831 if (permission === 'granted') {
3832 try {
3833 new Notification(title, {
3834 body: body,
3835 icon: '/assets/icon.png',
3836 badge: '/assets/badge.png'
3837 })
3838 } catch (err) {
3839 // Silently fail - notification not critical
3840 console.log('📢 Native notification unavailable (not critical)')
3841 }
38393842 }
3840 }
3841 }).catch(err => {
3842 // Silently fail - notification not critical
3843 console.log('📢 Notification permission request failed (not critical)')
3844 })
3843 }).catch(err => {
3844 // Silently fail - notification not critical
3845 console.log('📢 Notification permission request failed (not critical)')
3846 })
3847 }
38453848 }
3849 } catch (err) {
3850 // Silently fail if notification system not available
3851 // This is expected on systems without notification daemon
3852 console.log('📢 Native notifications unavailable (not critical):', err.message)
38463853 }
3847 } catch (err) {
3848 // Silently fail if notification system not available
3849 // This is expected on systems without notification daemon
3850 console.log('📢 Native notifications unavailable (not critical):', err.message)
3851 }
3854 }, 0)
38523855}
38533856
38543857// Expose functions to global window object for onclick/onchange handlers