Put fetchMangoGroup on a 20s interval so interest rate changes are reflected in Margin Account summary
This commit is contained in:
parent
af33279f42
commit
8f07e6b8dd
|
@ -8,7 +8,8 @@ import useMarketList from './useMarketList'
|
|||
import { notify } from '../utils/notifications'
|
||||
import useInterval from './useInterval'
|
||||
|
||||
const _SLOW_REFRESH_INTERVAL = 6 * 1000
|
||||
const SECONDS = 1000
|
||||
const _SLOW_REFRESH_INTERVAL = 6 * SECONDS
|
||||
|
||||
const marketAddressSelector = (s) => s.selectedMarket.address
|
||||
const mangoGroupMarketsSelector = (s) => s.selectedMangoGroup.markets
|
||||
|
@ -29,6 +30,10 @@ const useHydrateStore = () => {
|
|||
actions.fetchMangoGroup()
|
||||
}, [actions])
|
||||
|
||||
useInterval(() => {
|
||||
actions.fetchMangoGroup()
|
||||
}, 20 * SECONDS)
|
||||
|
||||
// load selected market
|
||||
useEffect(() => {
|
||||
Market.load(
|
||||
|
|
Loading…
Reference in New Issue