Skip to content

Commit

Permalink
fix: don't refetch final quotes after swap Tx has been initiated (#8528)
Browse files Browse the repository at this point in the history
* fix: don't refetch final quotes after swap Tx has been initiated

* chore: rm console log

---------

Co-authored-by: Apotheosis <[email protected]>
  • Loading branch information
gomesalexandre and 0xApotheosis authored Jan 9, 2025
1 parent d27bf47 commit 6b0a219
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,16 @@ export const useGetTradeQuotes = () => {
permit2?.state === TransactionExecutionState.AwaitingConfirmation) ||
(!permit2?.isRequired && hopExecutionMetadata?.state === HopExecutionState.AwaitingSwap)
)

return hopExecutionMetadata?.state === HopExecutionState.AwaitingSwap
}, [hopExecutionMetadata?.permit2, hopExecutionMetadata?.state, swapperName])
return (
hopExecutionMetadata?.state === HopExecutionState.AwaitingSwap &&
hopExecutionMetadata?.swap?.state === TransactionExecutionState.AwaitingConfirmation
)
}, [
hopExecutionMetadata?.permit2,
hopExecutionMetadata?.state,
hopExecutionMetadata?.swap?.state,
swapperName,
])

const shouldFetchTradeQuotes = useMemo(() => {
return Boolean(
Expand Down

0 comments on commit 6b0a219

Please sign in to comment.