mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-22 02:07:55 +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
HTML
75.2%
TypeScript
21.3%
Rust
1.9%
PLpgSQL
0.7%
JavaScript
0.6%
Other
0.2%