skip wallet fetch for anon users
This commit is contained in:
parent
41b86c8251
commit
623b69df3a
|
@ -197,6 +197,7 @@ function useConfig (walletDef) {
|
||||||
}, [walletDef, client])
|
}, [walletDef, client])
|
||||||
|
|
||||||
const refreshConfig = useCallback(async () => {
|
const refreshConfig = useCallback(async () => {
|
||||||
|
if (!me?.id) return
|
||||||
if (walletDef) {
|
if (walletDef) {
|
||||||
let newConfig = {}
|
let newConfig = {}
|
||||||
newConfig = {
|
newConfig = {
|
||||||
|
@ -467,12 +468,11 @@ export function WalletProvider ({ children }) {
|
||||||
const migratableKeys = !migrationRan.current && !SSR ? Object.keys(window.localStorage).filter(k => k.startsWith('wallet:')) : undefined
|
const migratableKeys = !migrationRan.current && !SSR ? Object.keys(window.localStorage).filter(k => k.startsWith('wallet:')) : undefined
|
||||||
|
|
||||||
const walletList = walletDefs.map(def => useWalletInner(def.name)).filter(w => w)
|
const walletList = walletDefs.map(def => useWalletInner(def.name)).filter(w => w)
|
||||||
const { data: bestWalletList } = useQuery(BEST_WALLETS, SSR
|
const { data: bestWalletList } = useQuery(BEST_WALLETS, {
|
||||||
? {}
|
pollInterval: POLL_INTERVAL,
|
||||||
: {
|
nextFetchPolicy: 'cache-and-network',
|
||||||
pollInterval: POLL_INTERVAL,
|
skip: !me?.id
|
||||||
nextFetchPolicy: 'cache-and-network'
|
})
|
||||||
})
|
|
||||||
|
|
||||||
const processSendWallets = (bestWalletData) => {
|
const processSendWallets = (bestWalletData) => {
|
||||||
const clientSideSorting = false // sorting is now done on the server
|
const clientSideSorting = false // sorting is now done on the server
|
||||||
|
|
Loading…
Reference in New Issue