Skip to content

Commit

Permalink
fix: [GSW-2048] Remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrg committed Jan 8, 2025
1 parent 1f0188c commit e5551a1
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions packages/web/src/hooks/swap/data/use-swap-handler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1095,21 +1095,6 @@ export const useSwapHandler = () => {
});
}, []);

// useEffect to set the initial token amount
// Set the amount from the URL parameter or initialization, if any
useEffect(() => {
if (!tokenA?.symbol || !tokenB?.symbol) return;

// Run only if amount is provided in URL parameter or initial state
if (defaultTokenAAmount || defaultTokenBAmount) {
if (defaultTokenAAmount) {
changeTokenAAmount(defaultTokenAAmount);
} else if (defaultTokenBAmount) {
changeTokenBAmount(defaultTokenBAmount);
}
}
}, [tokenA?.symbol, tokenB?.symbol, defaultTokenAAmount, defaultTokenBAmount]);

// useEffect to manage loading state when token amount changes
useEffect(() => {
if (!tokenA?.symbol || !tokenB?.symbol) return;
Expand Down

0 comments on commit e5551a1

Please sign in to comment.