diff --git a/apps/provider-console/next.config.js b/apps/provider-console/next.config.js index a2edb7009..5b412413d 100644 --- a/apps/provider-console/next.config.js +++ b/apps/provider-console/next.config.js @@ -1,4 +1,6 @@ /** @type {import('next').NextConfig} */ + +const { withSentryConfig } = require('@sentry/nextjs'); const nextConfig = { reactStrictMode: false, compiler: { @@ -34,5 +36,5 @@ const nextConfig = { }, }; -module.exports = nextConfig; +module.exports = withSentryConfig(nextConfig); diff --git a/apps/provider-console/package.json b/apps/provider-console/package.json index ecda06a7c..9095568c8 100644 --- a/apps/provider-console/package.json +++ b/apps/provider-console/package.json @@ -17,6 +17,8 @@ "@cosmos-kit/keplr": "^2.12.2", "@cosmos-kit/leap-extension": "^2.12.2", "@cosmos-kit/react": "^2.18.0", + "@sentry/nextjs": "^8.34.0", + "@sentry/tracing": "^7.114.0", "apexcharts": "^3.54.0", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", diff --git a/apps/provider-console/sentry.client.config.js b/apps/provider-console/sentry.client.config.js new file mode 100644 index 000000000..3bcd363ab --- /dev/null +++ b/apps/provider-console/sentry.client.config.js @@ -0,0 +1,8 @@ +import * as Sentry from "@sentry/nextjs"; + +Sentry.init({ + dsn: "http://e756e9e5316f88fa972329632f5e6434@192.168.1.95:9000/2", + integrations: [Sentry.replayIntegration()], + replaysSessionSampleRate: 0.1, + replaysOnErrorSampleRate: 1.0 +}); diff --git a/apps/provider-console/src/components/home/HomeContainer.tsx b/apps/provider-console/src/components/home/HomeContainer.tsx index f633fd227..875447b4b 100644 --- a/apps/provider-console/src/components/home/HomeContainer.tsx +++ b/apps/provider-console/src/components/home/HomeContainer.tsx @@ -1,7 +1,6 @@ "use client"; import React, { useEffect, useState } from "react"; import { useRouter } from "next/router"; -import { Footer } from "@src/components/layout/Footer"; import Layout from "../layout/Layout"; import { useWallet } from "@src/context/WalletProvider"; import networkStore from "@src/store/networkStore"; @@ -10,16 +9,14 @@ import restClient from "@src/utils/restClient"; import { WalletNotConnected } from "./WalletNotConnected"; import { NotAProvider } from "./NotAProvider"; import { Button, Spinner } from "@akashnetwork/ui/components"; -import { ProviderActionDetails } from "../shared/ProviderActionDetails"; import ProviderActionList from "../shared/ProviderActionList"; -import Link from "next/link"; import { useAtom } from "jotai"; import providerProcessStore from "@src/store/providerProcessStore"; export function HomeContainer() { const [, resetProcess] = useAtom(providerProcessStore.resetProviderProcess); const router = useRouter(); - const { isWalletConnected } = useWallet(); + const { isWalletConnected, isWalletArbitrarySigned } = useWallet(); const [isLoading, setIsLoading] = useState(false); const [isProvider, setIsProvider] = useState(false); const [, setProvider] = useState(null); @@ -31,9 +28,11 @@ export function HomeContainer() { useEffect(() => { if (isWalletConnected) { setIsLoading(true); - fetchProviderStatus(); + if (isWalletArbitrarySigned) { + fetchProviderStatus(); + } } - }, [isWalletConnected]); + }, [isWalletConnected, isWalletArbitrarySigned]); const fetchProviderStatus = async () => { try { @@ -97,7 +96,6 @@ export function HomeContainer() { )} -