diff --git a/src/app/api/_hooks/use-wallet.ts b/src/app/api/_hooks/use-wallet.ts index 0dd04fb..5982b94 100644 --- a/src/app/api/_hooks/use-wallet.ts +++ b/src/app/api/_hooks/use-wallet.ts @@ -37,25 +37,6 @@ export function useGetWalletNotifications( }) } -/* -export function useGetWalletNotifications(walletId: string) { - const { data, error, isLoading, isValidating, mutate } = useSWR( - endpoints.dashboard.wallet.notifications(walletId), - fetcher - ) - - return { - data, - isLoading, - error, - isValidating, - mutate // Include mutate for manual refresh - } - - // return useGetCommon(endpoints.dashboard.wallet.notifications(walletId)) -} -*/ - // ---------------------------------------------------------------------- export async function transferAll(userId: string, data: { walletTo: string }) { diff --git a/src/app/api/v1/auth/login/route.ts b/src/app/api/v1/auth/login/route.ts index d0ed7d2..673db13 100644 --- a/src/app/api/v1/auth/login/route.ts +++ b/src/app/api/v1/auth/login/route.ts @@ -67,6 +67,7 @@ export async function POST(req: NextRequest) { id: user.id, displayName: user.name || user.phone_number, wallet: user.wallet || '', + walletEOA: user.walletEOA || '', email: user.email || '', photoURL: user.photo || '/assets/images/avatars/generic-user.jpg', phoneNumber: user.phone_number || '' diff --git a/src/app/api/v1/user/[id]/route.ts b/src/app/api/v1/user/[id]/route.ts index 7de62bc..a332ac8 100644 --- a/src/app/api/v1/user/[id]/route.ts +++ b/src/app/api/v1/user/[id]/route.ts @@ -42,6 +42,7 @@ export async function GET(request: Request, { params }: { params: IParams }) { id: user.id, displayName: user.name, wallet: user.wallet, + walletEOA: user.walletEOA || '', email: user.email || '', photoURL: user.photo, phoneNumber: user.phone_number diff --git a/src/app/api/v1/wallet/[id]/notifications/route.ts b/src/app/api/v1/wallet/[id]/notifications/route.ts index 45ac20a..355c05a 100644 --- a/src/app/api/v1/wallet/[id]/notifications/route.ts +++ b/src/app/api/v1/wallet/[id]/notifications/route.ts @@ -14,8 +14,6 @@ type IParams = { // ---------------------------------------------------------------------- export async function GET(request: Request, { params }: { params: IParams }) { - console.log('get notificacions called') - if (!params.id) { const errorMessage: IErrorResponse = { error: { diff --git a/src/config-global.ts b/src/config-global.ts index 228187b..804aea8 100644 --- a/src/config-global.ts +++ b/src/config-global.ts @@ -39,7 +39,7 @@ export const RECAPTCHA_SITE_KEY = process.env.NEXT_PUBLIC_RECAPTCHA_SITE_KEY || export const EXPLORER_L1_URL: string = process.env.NEXT_PUBLIC_EXPLORER_L1_URL || 'https://sepolia.etherscan.io' export const EXPLORER_L2_URL: string = - process.env.NEXT_PUBLIC_EXPLORER_L2_URL || 'https://sepolia.arbiscan.io/' + process.env.NEXT_PUBLIC_EXPLORER_L2_URL || 'https://sepolia.arbiscan.io' export const EXPLORER_NFT_URL: string = process.env.NEXT_PUBLIC_EXPLORER_NFT_URL || 'https://sepolia.arbiscan.io' export const NFT_IMAGE_REPOSITORY = ( diff --git a/src/sections/account/account-general.tsx b/src/sections/account/account-general.tsx index a080236..d1d3b67 100644 --- a/src/sections/account/account-general.tsx +++ b/src/sections/account/account-general.tsx @@ -85,7 +85,8 @@ export default function AccountGeneral() { email: user!.email, phone_number: user!.phoneNumber, photo: user!.photoURL, - wallet: user!.wallet + wallet: user!.wallet, + walletEOA: user!.walletEOA } await updateContact(user!.id, userData) diff --git a/src/sections/banking/banking-balances.tsx b/src/sections/banking/banking-balances.tsx index 4d5283e..ca32a11 100644 --- a/src/sections/banking/banking-balances.tsx +++ b/src/sections/banking/banking-balances.tsx @@ -22,7 +22,7 @@ import { useResponsive } from 'src/hooks/use-responsive' import { fNumber } from 'src/utils/format-number' import { useTranslate } from 'src/locales' -import { EXPLORER_L1_URL, EXPLORER_L2_URL, BOT_WAPP_URL } from 'src/config-global' +import { BOT_WAPP_URL, EXPLORER_L1_URL, EXPLORER_L2_URL } from 'src/config-global' import Iconify from 'src/components/iconify' diff --git a/src/sections/nfts/nft-item-share.tsx b/src/sections/nfts/nft-item-share.tsx index 3c4ac32..e846060 100644 --- a/src/sections/nfts/nft-item-share.tsx +++ b/src/sections/nfts/nft-item-share.tsx @@ -175,15 +175,14 @@ export default function NftItemShare({ nftId, nftData }: NftItemClaimProps) { {/* Diálogo de compartir */} - {t('nfts.share.cta')} + {t('common.share')} { const [walletAddress, setWalletAddress] = useState(null) useEffect(() => { - if (user && user.wallet) { - setWalletAddress(user.wallet) + // User is subscribed to the Push channel using his EOA wallet!" + if (user && user.walletEOA) { + setWalletAddress(user.walletEOA) } }, [user]) const { data, isLoading }: { data: any; isLoading: boolean } = useGetWalletNotifications( - walletAddress || user?.wallet, + walletAddress || user?.walletEAO, 5, notificationsRefreshInterval ) diff --git a/src/types/account.ts b/src/types/account.ts index 3cbc9eb..4328f7b 100644 --- a/src/types/account.ts +++ b/src/types/account.ts @@ -5,5 +5,6 @@ export type IAccount = { phone_number: string photo: string wallet: string + walletEOA: string code?: string }