Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿

refactor: improve address handling in CreatorCoin component by removing unnecessary type assertions

yoginth.com 89f8cac0 1766199b

verified
+2 -5
+2 -5
apps/web/src/components/Settings/Pro/CreatorCoin.tsx
··· 102 102 enabled: isValidAddress, 103 103 queryFn: async () => { 104 104 const res = await getCoin({ 105 - address: creatorCoinAddress as string, 105 + address: creatorCoinAddress, 106 106 chain: base.id 107 107 }); 108 108 return res.data?.zora20Token ?? null; ··· 113 113 const { data: creatorCoinFromZora } = useQuery<string | null>({ 114 114 enabled: !!currentAccount?.owner && !creatorCoinAddress, 115 115 queryFn: async () => { 116 - const res = await getProfileCoins({ 117 - identifier: currentAccount?.owner as string 118 - }); 119 - 116 + const res = await getProfileCoins({ identifier: currentAccount?.owner }); 120 117 return res.data?.profile?.creatorCoin?.address ?? null; 121 118 }, 122 119 queryKey: ["profileCoins", currentAccount?.owner]