Skip to content

Commit

Permalink
feat: Add log
Browse files Browse the repository at this point in the history
  • Loading branch information
jinoosss committed Dec 1, 2023
1 parent a9b2dde commit 1c97d1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ const SwapContainer: React.FC = () => {
});
}, 2000);
return () => clearTimeout(timeout);
}, [type, tokenA, tokenAAmount, tokenB, tokenBAmount]);
}, [type, tokenA, tokenAAmount, tokenB, tokenBAmount, estimateSwapRoute, checkBalance]);

useEffect(() => {
const queryValues = [];
Expand Down
5 changes: 4 additions & 1 deletion packages/web/src/hooks/swap/use-swap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const useSwap = ({
return null;
}
const pools = await poolRepository.getRPCPools();
console.log("pools", pools);
swapRouterRepository.updatePools(pools);

return swapRouterRepository.estimateSwapRoute({
Expand All @@ -59,7 +60,9 @@ export const useSwap = ({
setEstimatedRoutes(response.estimatedRoutes);
setEstimatedAmount(response.amount);
return response;
}).catch(() => {
}).catch(e => {

console.log(e);
setEstimatedRoutes([]);
setEstimatedAmount(null);
return null;
Expand Down

0 comments on commit 1c97d1e

Please sign in to comment.