OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-wallet-desktop commits / e09e97d

Fix: add USDC sync support and display token amounts correctly in transactions
Deployment: testing (hyper-wallet-desktop-test) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
e09e97de5ec153141c572a7c032f034de6d523e3
by plankatron <fleeky@gmail.com> · 2026-01-30T03:20:19.000Z

Changed files (2) +33 -11

.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-29T22:15:10-05:00",
8 "commit_message": "Fix: sync now refreshes balance from blockchain and enable forceSyncNow",
7 "deployed_at": "2026-01-29T22:16:36-05:00",
8 "commit_message": "Fix: sync transactions uses current account index instead of hardcoded 0",
99 "tmux": "pear-seed:5"
1010}
desktop/wallet.js +31 -9
……@@ -2225,9 +2225,18 @@ async function loadTransactions() {
22252225 const dirClass = tx.direction === 'sent' ? 'sent' : 'received'
22262226 const statusIcon = tx.status === 'confirmed' ? '✅' : '⏳'
22272227
2228 // Format amount using chain config
2229 const chain = SUPPORTED_CHAINS[tx.chain]
2230 const amount = chain ? chain.formatBalance(tx.amount) : tx.amount
2228 // Format amount - handle tokens specially
2229 const baseChain = tx.chain.replace(/-usdt$/, '').replace(/-usdc$/, '')
2230 const chain = SUPPORTED_CHAINS[baseChain]
2231 let amount
2232 if (tx.token || tx.chain.includes('-usdt') || tx.chain.includes('-usdc')) {
2233 const tokenSymbol = tx.token || (tx.chain.includes('-usdt') ? 'USDT' : 'USDC')
2234 const decimals = tx.decimals || 6
2235 const tokenAmount = Number(tx.amount) / Math.pow(10, decimals)
2236 amount = `${tokenAmount.toFixed(2)} ${tokenSymbol}`
2237 } else {
2238 amount = chain ? chain.formatBalance(tx.amount) : tx.amount
2239 }
22312240
22322241 // Look up contact for the to/from address
22332242 const relevantAddress = tx.direction === 'sent' ? tx.to : tx.from
……@@ -2706,17 +2715,30 @@ function showTxDetails(index) {
27062715 const directionIcon = tx.direction === 'sent' ? '📤' : '📥'
27072716 const statusIcon = tx.status === 'confirmed' ? '✅' : '⏳'
27082717
2709 // Format using chain config
2710 const chain = SUPPORTED_CHAINS[tx.chain]
2711 const amount = chain ? chain.formatBalance(tx.amount) : tx.amount
2712 const fee = chain ? chain.formatSmallUnit(tx.fee) : tx.fee
2718 // Format amount based on chain/token
2719 let amount, fee
2720 const baseChain = tx.chain.replace(/-usdt$/, '').replace(/-usdc$/, '')
2721 const chain = SUPPORTED_CHAINS[baseChain]
2722
2723 // Check if this is a token transaction
2724 if (tx.token || tx.chain.includes('-usdt') || tx.chain.includes('-usdc')) {
2725 const tokenSymbol = tx.token || (tx.chain.includes('-usdt') ? 'USDT' : 'USDC')
2726 const decimals = tx.decimals || 6 // USDT/USDC have 6 decimals
2727 const tokenAmount = Number(tx.amount) / Math.pow(10, decimals)
2728 amount = `${tokenAmount.toFixed(decimals > 6 ? 6 : decimals)} ${tokenSymbol}`
2729 // Fee is still in ETH (wei)
2730 fee = chain ? chain.formatSmallUnit(tx.fee) : `${tx.fee} wei`
2731 } else {
2732 amount = chain ? chain.formatBalance(tx.amount) : tx.amount
2733 fee = chain ? chain.formatSmallUnit(tx.fee) : tx.fee
2734 }
27132735
27142736 // Explorer links (chain-specific URLs)
27152737 let explorerLink = ''
2716 if (tx.chain === 'bitcoin') {
2738 if (baseChain === 'bitcoin') {
27172739 const network = tx.network === 'testnet' ? 'testnet/' : ''
27182740 explorerLink = `https://blockstream.info/${network}tx/${tx.hash}`
2719 } else if (tx.chain === 'ethereum') {
2741 } else if (baseChain === 'ethereum') {
27202742 const network = tx.network === 'testnet' ? 'sepolia.' : ''
27212743 explorerLink = `https://${network}etherscan.io/tx/${tx.hash}`
27222744 }