Merge remote-tracking branch 'origin/mango_group_interval' into main

This commit is contained in:
Tyler Shipe 2021-04-26 15:31:30 -04:00
commit d38a20cb1d
1 changed files with 6 additions and 1 deletions

View File

@ -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(