Skip to content

Commit

Permalink
Remove unwanted debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
csillag committed May 21, 2024
1 parent 5d6970c commit 7ceb3c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 0 additions & 2 deletions src/app/data/pontusx-account-names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ export const useSearchForPontusXAccountsByName = (
}),
)

if (matches?.length) console.log('PontusX matches to load:', matches)

const {
isLoading: areAccountsLoading,
isError: areAccountsError,
Expand Down
11 changes: 4 additions & 7 deletions src/oasis-nexus/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ export const useGetConsensusAccountsAddress: typeof generated.useGetConsensusAcc
return generated.useGetConsensusAccountsAddress(network, address, {
...options,
query: {
...options?.query,
queryKey: [network, Layer.consensus, 'accounts', 'byAddress', address],
...(options?.query ?? {}),
enabled: !!address && (options?.query?.enabled ?? true),
},
request: {
...options?.request,
Expand Down Expand Up @@ -357,7 +357,6 @@ export const useGetRuntimeAccountsAddress: typeof generated.useGetRuntimeAccount
query: {
...(options?.query ?? {}),
enabled: !!oasisAddress && (options?.query?.enabled ?? true),
queryKey: [network, runtime, 'accounts', 'byAddress', address],
},
request: {
...options?.request,
Expand Down Expand Up @@ -470,8 +469,7 @@ export const useGetRuntimeAccountsAddresses = (
)
return {
isLoading: !!targets?.length && queries.some(query => query.isLoading && query.fetchStatus !== 'idle'),
isError: queries.some(query => query.isError),
isFetched: !queries.some(query => !query.isFetched),
isError: queries.some(query => query.isError) || targets?.length > MAX_LOADED_ADDRESSES,
data: queries.map(query => query.data?.data).filter(account => !!account) as RuntimeAccount[],
}
}
Expand All @@ -495,8 +493,7 @@ export const useGetConsensusAccountsAddresses = (

return {
isLoading: !!targets?.length && queries.some(query => query.isLoading && query.fetchStatus !== 'idle'),
isError: queries.some(query => query.isError),
isFetched: !queries.some(query => !query.isFetched),
isError: queries.some(query => query.isError) || targets?.length > MAX_LOADED_ADDRESSES,
data: queries.map(query => query.data?.data).filter(account => !!account) as generated.Account[],
}
}
Expand Down

0 comments on commit 7ceb3c1

Please sign in to comment.