Skip to content

Commit

Permalink
feat: fix undefined return of soulnames
Browse files Browse the repository at this point in the history
  • Loading branch information
simodrws committed Jun 21, 2023
1 parent 866facd commit 4ecf84d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 0 additions & 4 deletions src/refactor/masa-client/use-masa-query-client.ts
@@ -1,12 +1,8 @@
import { useQueryClient } from '@tanstack/react-query';
import { useClient } from 'wagmi';
import { QcContext } from '../masa-provider';

export const useMasaQueryClient = () => {
const queryClient = useQueryClient({ context: QcContext });
const client = useClient();

console.log('wagmiclient', { client });

return queryClient;
};
6 changes: 5 additions & 1 deletion src/refactor/masa/use-soulnames.ts
Expand Up @@ -13,7 +13,11 @@ export const useSoulNames = () => {
enabled: !!masa && !!masaAddress && !!masaNetwork,
context: QcContext,
queryKey: ['soulnames', { masaAddress, masaNetwork, persist: false }],
queryFn: async () => masa?.soulName.list(),
queryFn: async () => {
const snResult = await masa?.soulName.list();
if (snResult) return snResult;
return null;
},
});

useAsync(async () => getSoulnames(), [getSoulnames]);
Expand Down

0 comments on commit 4ecf84d

Please sign in to comment.