Skip to content

Commit

Permalink
fix: increase quote refresh interval for Swap and TWAP (cowprotocol#3935
Browse files Browse the repository at this point in the history
)
  • Loading branch information
shoom3301 authored Feb 27, 2024
1 parent 4f98075 commit 55b5e22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/cowswap-frontend/src/common/updaters/FeesUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { getPriceQuality } from 'api/gnosisProtocol/api'
import { useVerifiedQuotesEnabled } from '../hooks/featureFlags/useVerifiedQuotesEnabled'

export const TYPED_VALUE_DEBOUNCE_TIME = 350
export const SWAP_QUOTE_CHECK_INTERVAL = ms`10s` // Every 10s
export const SWAP_QUOTE_CHECK_INTERVAL = ms`30s` // Every 30s
const RENEW_FEE_QUOTES_BEFORE_EXPIRATION_TIME = ms`30s` // Will renew the quote if there's less than 30 seconds left for the quote to expire
const WAITING_TIME_BETWEEN_EQUAL_REQUESTS = ms`5s` // Prevents from sending the same request to often (max, every 5s)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ import { useQuoteParams } from './useQuoteParams'

import { tradeQuoteParamsAtom } from '../state/tradeQuoteParamsAtom'

// Every 10s
export const PRICE_UPDATE_INTERVAL = 10_000
export const PRICE_UPDATE_INTERVAL = ms`30s`
const AMOUNT_CHANGE_DEBOUNCE_TIME = ms`300`

// Solves the problem of multiple requests
Expand Down

0 comments on commit 55b5e22

Please sign in to comment.