pezkuwichain e92baa75c7 fix: DEX swap calculation and wallet refresh issues
- Fix AMM formula to use correct 3% LP fee (was 0.3%)
  - Runtime uses LPFee=30 (3% = 30/1000)
  - Changed to Uniswap V2 formula: amountOut = (amountIn * 970 * reserveOut) / (reserveIn * 1000 + amountIn * 970)
  - Fixes ProvidedMinimumNotSufficientForSwap error

- Fix wallet disconnection after successful swap
  - Added refreshBalances() to WalletContext
  - Replaced window.location.reload() with refreshBalances()
  - Wallet connection now persists after swap

Changes:
- src/components/TokenSwap.tsx: Correct AMM formula, async callback for refresh
- src/contexts/WalletContext.tsx: Add refreshBalances() export
2025-11-01 08:18:24 +03:00
2025-10-22 18:05:19 -07:00
S
Description
No description provided
Readme MIT 107 MiB
Languages
HTML 75.2%
TypeScript 21.3%
Rust 1.9%
PLpgSQL 0.7%
JavaScript 0.6%
Other 0.2%