mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-07-25 15:05:42 +00:00
e92baa75c7d7a3f59fd0fe9d892b7486a8b10ae8
- 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
Languages
TypeScript
88.4%
Rust
4.1%
PLpgSQL
3.8%
JavaScript
2.2%
CSS
0.8%
Other
0.6%