feat/ponder-lm-indexing (#142)
This commit is contained in:
parent
de3c8eef94
commit
31063379a8
107 changed files with 12517 additions and 367 deletions
95
tmp/usertest-results/TEST-BALANCE-FIX.md
Normal file
95
tmp/usertest-results/TEST-BALANCE-FIX.md
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
# Quick Test Guide - Balance Bug Fix
|
||||
|
||||
## Test the Fix in 60 Seconds
|
||||
|
||||
### Setup (5 seconds)
|
||||
```bash
|
||||
cd /home/debian/harb
|
||||
# Ensure dev environment is running
|
||||
# If not: npm run dev in web-app/
|
||||
```
|
||||
|
||||
### Test Steps (55 seconds)
|
||||
|
||||
1. **Open app in browser** (http://localhost:5173 or staging URL)
|
||||
|
||||
2. **Connect wallet** - Use MetaMask or test wallet
|
||||
|
||||
3. **Navigate to Cheats page** (/cheats)
|
||||
|
||||
4. **Check current KRK balance**
|
||||
- Open browser console
|
||||
- Type: `console.log('Balance before swap')`
|
||||
- Navigate to Stake page, note the balance
|
||||
|
||||
5. **Return to Cheats page**
|
||||
|
||||
6. **Perform swap:**
|
||||
- Enter amount: `0.1` ETH
|
||||
- Click "Buy" button
|
||||
- Confirm transaction in wallet
|
||||
|
||||
7. **Watch for:**
|
||||
- ✅ Toast notification: "Swap submitted..."
|
||||
- ✅ Transaction confirmation
|
||||
- ✅ **No console errors**
|
||||
|
||||
8. **Immediately navigate to Stake page**
|
||||
|
||||
9. **Verify:**
|
||||
- ✅ KRK balance displays new amount (not 0)
|
||||
- ✅ Balance loads within 1-2 seconds
|
||||
- ✅ Slider shows correct max amount
|
||||
- ✅ "Insufficient Balance" does NOT appear
|
||||
- ✅ Can input stake amount and submit
|
||||
|
||||
## Expected Console Output
|
||||
|
||||
```
|
||||
loadBalance // This should appear right after swap
|
||||
```
|
||||
|
||||
## Success Criteria
|
||||
|
||||
✅ Balance updates immediately after swap completes
|
||||
✅ No delay when navigating to stake page
|
||||
✅ Stake form is usable without refresh
|
||||
|
||||
## If Test Fails
|
||||
|
||||
### Check:
|
||||
1. Did the swap transaction actually confirm? (check wallet)
|
||||
2. Any errors in browser console?
|
||||
3. Is the RPC endpoint responding? (Network tab)
|
||||
4. Is the correct contract address configured?
|
||||
|
||||
### Debug Commands:
|
||||
```bash
|
||||
# Check if changes are present
|
||||
cd /home/debian/harb/web-app/src/views
|
||||
grep -A 3 "loadBalance()" CheatsView.vue
|
||||
# Should show the new code
|
||||
|
||||
# Check imports
|
||||
grep "useWallet" CheatsView.vue
|
||||
# Should show: import { useWallet } from '@/composables/useWallet';
|
||||
```
|
||||
|
||||
## Files to Review
|
||||
|
||||
- **Bug Analysis:** `/home/debian/harb/tmp/usertest-results/BALANCE-BUG-ANALYSIS.md`
|
||||
- **Fix Summary:** `/home/debian/harb/tmp/usertest-results/BALANCE-BUG-FIX-SUMMARY.md`
|
||||
- **Modified File:** `/home/debian/harb/web-app/src/views/CheatsView.vue`
|
||||
|
||||
## Before vs After Comparison
|
||||
|
||||
| Scenario | Before Fix | After Fix |
|
||||
|----------|-----------|-----------|
|
||||
| Swap then navigate | Balance: 0 KRK (or waits 10-90s) | Balance: correct amount (1-2s) |
|
||||
| Can stake? | ❌ "Insufficient Balance" | ✅ Yes, immediately |
|
||||
| User frustration | 😤 High | 😊 None |
|
||||
| Required workaround | Page refresh or wait | None needed |
|
||||
|
||||
---
|
||||
|
||||
**Quick Validation:** If you can swap → navigate → stake without any wait or error, the fix works! 🎉
|
||||
Loading…
Add table
Add a link
Reference in a new issue