OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-wallet-desktop commits / 564ab19

Fix: show token amount + ETH gas in Total display for token transfers
Deployment: testing (hyper-wallet-desktop-test) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
564ab1939f175acdb669ce26acf81a8bb58d322f
by plankatron <fleeky@gmail.com> · 2026-01-30T02:56:48.000Z

Changed files (2) +33 -5

.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:34:13-05:00",
8 "commit_message": "Fix: add fallback for testnet token fee estimation when contract unavailable",
7 "deployed_at": "2026-01-29T21:52:47-05:00",
8 "commit_message": "Fix: display gas fees in ETH instead of Gwei for token transfers",
99 "tmux": "pear-seed:5"
1010}
desktop/wallet.js +31 -3
……@@ -2939,7 +2939,20 @@ async function setMaxAmount() {
29392939 ? formatSats(estimatedFee)
29402940 : formatEthFee(estimatedFee)
29412941
2942 const unit = currentSendChain === 'bitcoin' ? 'sats' : 'wei'
2942 // For tokens, fee is in ETH (different currency), so show separately
2943 const isToken = currentSendChain.includes('usdt') || currentSendChain.includes('usdc')
2944 let totalDisplay
2945 if (currentSendChain === 'bitcoin') {
2946 totalDisplay = `${currentBalance.toLocaleString()} sats`
2947 } else if (isToken) {
2948 const tokenSymbol = currentSendChain.includes('usdt') ? 'USDT' : 'USDC'
2949 const tokenAmount = Number(maxAmount) / (currentSendChain.includes('usdt') ? 1e6 : 1e6)
2950 totalDisplay = `${tokenAmount.toFixed(2)} ${tokenSymbol} + ${feeFormatted} gas`
2951 } else {
2952 // Native ETH
2953 const totalEth = Number(currentBalance) / 1e18
2954 totalDisplay = `${totalEth.toFixed(6)} ETH`
2955 }
29432956
29442957 document.getElementById('fee-display').innerHTML = `
29452958 <div class="fee-option">
……@@ -2948,7 +2961,7 @@ async function setMaxAmount() {
29482961 </div>
29492962 <div class="fee-option">
29502963 <span class="fee-label">Total</span>
2951 <span class="fee-value">${currentBalance.toLocaleString()} ${unit}</span>
2964 <span class="fee-value">${totalDisplay}</span>
29522965 </div>
29532966 <p class="help-text" style="margin-top: 0.5rem; color: #f59e0b;">
29542967 ℹ️ Max amount is your balance minus transaction fees
……@@ -3005,6 +3018,21 @@ async function estimateFee() {
30053018 ? formatSats(data.fee)
30063019 : formatEthFee(data.fee)
30073020
3021 // For tokens, fee is in ETH (different currency), so show separately
3022 const isToken = currentSendChain.includes('usdt') || currentSendChain.includes('usdc')
3023 let totalDisplay
3024 if (currentSendChain === 'bitcoin') {
3025 totalDisplay = `${Number(amount) + Number(data.fee)} sats`
3026 } else if (isToken) {
3027 const tokenSymbol = currentSendChain.includes('usdt') ? 'USDT' : 'USDC'
3028 totalDisplay = `${amount} ${tokenSymbol} + ${feeFormatted} gas`
3029 } else {
3030 // Native ETH - convert both to ETH for total
3031 const totalWei = BigInt(amount) + BigInt(data.fee)
3032 const totalEth = Number(totalWei) / 1e18
3033 totalDisplay = `${totalEth.toFixed(6)} ETH`
3034 }
3035
30083036 document.getElementById('fee-display').innerHTML = `
30093037 <div class="fee-option">
30103038 <span class="fee-label">Estimated Fee</span>
……@@ -3012,7 +3040,7 @@ async function estimateFee() {
30123040 </div>
30133041 <div class="fee-option">
30143042 <span class="fee-label">Total</span>
3015 <span class="fee-value">${Number(amount) + Number(data.fee)} ${currentSendChain === 'bitcoin' ? 'sats' : 'wei'}</span>
3043 <span class="fee-value">${totalDisplay}</span>
30163044 </div>
30173045 `
30183046 } catch (err) {