Skip to content

Commit

Permalink
Merge pull request #99 from DarkFlorist/query-optimization
Browse files Browse the repository at this point in the history
clear trade state when user clears input/output
  • Loading branch information
KillariDev authored Feb 12, 2024
2 parents bc22d1e + 42d2c5e commit fbf6dc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/state/routing/useRoutingAPITrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function useRoutingAPITrade<TTradeType extends TradeType>(
useEffect(() => {
const args = queryArgs
if (skipFetch) return
if (args === skipToken) return
if (args === skipToken) return setResult({ state: TradeState.INVALID, trade: undefined, currentTrade: undefined })
async function updateResults(args: GetQuoteArgs) {
if (document.hidden) return
const walletProvider = provider
Expand Down

0 comments on commit fbf6dc8

Please sign in to comment.