increase refresh intervals
This commit is contained in:
parent
4de2c58ebb
commit
d9eee98f5e
|
@ -10,6 +10,7 @@ import {
|
||||||
import { WalletAdapter } from '../@types/types'
|
import { WalletAdapter } from '../@types/types'
|
||||||
import useInterval from './useInterval'
|
import useInterval from './useInterval'
|
||||||
|
|
||||||
|
const SECONDS = 1000
|
||||||
const ASSET_URL =
|
const ASSET_URL =
|
||||||
'https://cdn.jsdelivr.net/gh/solana-labs/oyster@main/assets/wallets'
|
'https://cdn.jsdelivr.net/gh/solana-labs/oyster@main/assets/wallets'
|
||||||
|
|
||||||
|
@ -143,13 +144,13 @@ export default function useWallet() {
|
||||||
actions.fetchMarginAccounts()
|
actions.fetchMarginAccounts()
|
||||||
actions.fetchWalletBalances()
|
actions.fetchWalletBalances()
|
||||||
}
|
}
|
||||||
}, 15000)
|
}, 20 * SECONDS)
|
||||||
|
|
||||||
useInterval(() => {
|
useInterval(() => {
|
||||||
if (connected && marginAccount) {
|
if (connected && marginAccount) {
|
||||||
actions.fetchTradeHistory()
|
actions.fetchTradeHistory()
|
||||||
}
|
}
|
||||||
}, 60000)
|
}, 180 * SECONDS)
|
||||||
|
|
||||||
return { connected, wallet }
|
return { connected, wallet }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue