Skip to content

Commit

Permalink
no warning when no usd amount
Browse files Browse the repository at this point in the history
  • Loading branch information
codingki committed Apr 16, 2024
1 parent 80eb63f commit d24bc4c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/SwapWidget/useSwapWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ export function useSwapWidget() {
return [undefined, undefined];
}

if (Number(route.usdAmountIn) === 0 || Number(route.usdAmountOut) === 0) {
return [undefined, undefined];
}

if (route.warning.type === "BAD_PRICE_WARNING") {
return ["Bad Price Warning", route.warning.message];
}
Expand Down

0 comments on commit d24bc4c

Please sign in to comment.