OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-wallet-desktop commits / 53ac831

Fix: display gas fees in ETH instead of Gwei for token transfers
Deployment: testing (hyper-wallet-desktop-test) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
53ac8315ba9726a781525a105b857004f4558b77
by plankatron <fleeky@gmail.com> · 2026-01-30T02:52:27.000Z

Changed files (3) +32 -45

.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:31:04-05:00",
8 "commit_message": "Fix: use dataset flag to prevent address selector cascade, remove reload from onchange",
7 "deployed_at": "2026-01-29T21:34:13-05:00",
8 "commit_message": "Fix: add fallback for testnet token fee estimation when contract unavailable",
99 "tmux": "pear-seed:5"
1010}
desktop/wallet.js +13 -3
……@@ -2033,6 +2033,16 @@ function formatGwei(wei) {
20332033 return `${gwei.toFixed(2)} Gwei`
20342034}
20352035
2036// Format fee in ETH (for Ethereum-based token transfers)
2037// Gas fees for token transfers are paid in ETH, not the token
2038function formatEthFee(wei) {
2039 const eth = Number(wei) / 1e18
2040 if (eth < 0.0001) {
2041 return `${(eth * 1e6).toFixed(4)} µETH`
2042 }
2043 return `${eth.toFixed(6)} ETH`
2044}
2045
20362046// Show error toast
20372047function showError(message) {
20382048 const toast = document.getElementById('error-toast')
……@@ -2927,7 +2937,7 @@ async function setMaxAmount() {
29272937 // Display fee info
29282938 const feeFormatted = currentSendChain === 'bitcoin'
29292939 ? formatSats(estimatedFee)
2930 : formatGwei(estimatedFee)
2940 : formatEthFee(estimatedFee)
29312941
29322942 const unit = currentSendChain === 'bitcoin' ? 'sats' : 'wei'
29332943
……@@ -2993,7 +3003,7 @@ async function estimateFee() {
29933003
29943004 const feeFormatted = currentSendChain === 'bitcoin'
29953005 ? formatSats(data.fee)
2996 : formatGwei(data.fee)
3006 : formatEthFee(data.fee)
29973007
29983008 document.getElementById('fee-display').innerHTML = `
29993009 <div class="fee-option">
……@@ -3068,7 +3078,7 @@ function confirmSend() {
30683078 : formatETH(amount)
30693079 const feeFormatted = currentSendChain === 'bitcoin'
30703080 ? formatSats(estimatedFee)
3071 : formatGwei(estimatedFee)
3081 : formatEthFee(estimatedFee)
30723082
30733083 const networkWarning = selectedNetwork === 'mainnet'
30743084 ? '<div class="confirm-warning">⚠️ WARNING: You are sending on MAINNET. This will use real funds!</div>'
scripts/pear-deploy.sh +17 -40
……@@ -7,13 +7,14 @@
77#
88# Workflow:
99# 1. Pre-flight checks (node_modules, critical files)
10# 2. Run tests (abort if failing)
11# 3. Git commit + push
12# 4. Pear stage
13# 5. Pear release
14# 6. Restart seeder in tmux (NOT background)
15# 7. Verify seeder started
16# 8. Update deployment history
10# 2. Git commit + push
11# 3. Pear stage
12# 4. Pear release
13# 5. Restart seeder in tmux (NOT background)
14# 6. Verify seeder started
15# 7. Update deployment history
16#
17# Note: Run tests separately before deployment: bare test/all.cjs
1718
1819set -e # Exit on error
1920
……@@ -45,7 +46,6 @@ NC='\033[0m'
4546
4647MODE=""
4748COMMIT_MSG=""
48SKIP_TESTS=false
4949
5050show_usage() {
5151 echo "Usage:"
……@@ -55,12 +55,13 @@ show_usage() {
5555 echo "Options:"
5656 echo " --testing, -t Deploy to testing channel (branch: $TESTING_BRANCH)"
5757 echo " --production, -p Deploy to production channel (branch: $PRODUCTION_BRANCH)"
58 echo " --skip-tests Skip running tests (not recommended)"
5958 echo ""
6059 echo "Channels:"
6160 echo " Testing: $TESTING_CHANNEL"
6261 echo " Production: $PRODUCTION_CHANNEL"
6362 echo ""
63 echo "Note: Run tests separately before deployment with: bare test/all.cjs"
64 echo ""
6465 exit 1
6566}
6667
……@@ -75,10 +76,6 @@ while [[ $# -gt 0 ]]; do
7576 MODE="production"
7677 shift
7778 ;;
78 --skip-tests)
79 SKIP_TESTS=true
80 shift
81 ;;
8279 -*)
8380 echo -e "${RED}Unknown option: $1${NC}"
8481 show_usage
……@@ -162,31 +159,11 @@ done
162159echo -e " ${GREEN}✓ All critical files present${NC}"
163160
164161# ============================================================================
165# STEP 2: RUN TESTS
166# ============================================================================
167
168echo ""
169if [ "$SKIP_TESTS" = true ]; then
170 echo -e "${YELLOW}Step 2: Tests SKIPPED (--skip-tests)${NC}"
171else
172 echo -e "${YELLOW}Step 2: Running Tests${NC}"
173 echo " Running: bare test/all.cjs"
174
175 # Run tests directly (output streams to terminal)
176 if bare test/all.cjs; then
177 echo -e " ${GREEN}✓ All tests passed${NC}"
178 else
179 echo -e "${RED} ✗ Tests FAILED!${NC}"
180 exit 1
181 fi
182fi
183
184# ============================================================================
185# STEP 3: GIT COMMIT + PUSH
162# STEP 2: GIT COMMIT + PUSH
186163# ============================================================================
187164
188165echo ""
189echo -e "${YELLOW}Step 3: Git Commit + Push${NC}"
166echo -e "${YELLOW}Step 2: Git Commit + Push${NC}"
190167
191168if [ -n "$(git status --porcelain)" ]; then
192169 echo " Changes to commit:"
……@@ -222,7 +199,7 @@ fi
222199# ============================================================================
223200
224201echo ""
225echo -e "${YELLOW}Step 4: Pear Stage${NC}"
202echo -e "${YELLOW}Step 3: Pear Stage${NC}"
226203
227204echo " Running: pear stage $CHANNEL ."
228205STAGE_OUTPUT=$(pear stage "$CHANNEL" . 2>&1)
……@@ -237,7 +214,7 @@ echo -e " ${GREEN}✓ Staged version: $LATEST${NC}"
237214# ============================================================================
238215
239216echo ""
240echo -e "${YELLOW}Step 5: Pear Release${NC}"
217echo -e "${YELLOW}Step 4: Pear Release${NC}"
241218
242219echo " Running: pear release $CHANNEL"
243220pear release "$CHANNEL" 2>&1 | sed 's/^/ /'
……@@ -248,7 +225,7 @@ echo -e " ${GREEN}✓ Released as default${NC}"
248225# ============================================================================
249226
250227echo ""
251echo -e "${YELLOW}Step 6: Restart Seeder in Tmux${NC}"
228echo -e "${YELLOW}Step 5: Restart Seeder in Tmux${NC}"
252229
253230# Check tmux session exists
254231if ! tmux has-session -t "$TMUX_SESSION" 2>/dev/null; then
……@@ -281,7 +258,7 @@ echo -e " ${GREEN}✓ Seeder command sent to $TMUX_SESSION:$TMUX_WINDOW${NC}"
281258# ============================================================================
282259
283260echo ""
284echo -e "${YELLOW}Step 7: Verify Seeder${NC}"
261echo -e "${YELLOW}Step 6: Verify Seeder${NC}"
285262
286263sleep 3
287264PANE_CONTENT=$(tmux capture-pane -t "$TMUX_SESSION:$TMUX_WINDOW" -p 2>/dev/null | tail -10)
……@@ -301,7 +278,7 @@ PEAR_KEY=$(pear info "$CHANNEL" --json 2>/dev/null | grep -oP '"key":"pear://\K[
301278# ============================================================================
302279
303280echo ""
304echo -e "${YELLOW}Step 8: Update Deployment History${NC}"
281echo -e "${YELLOW}Step 7: Update Deployment History${NC}"
305282
306283HISTORY_FILE="$PROJECT_DIR/.claude/deployment-history.json"
307284mkdir -p "$(dirname "$HISTORY_FILE")"