diff --git a/packages/frontend/src/components/projects/create/Configure.tsx b/packages/frontend/src/components/projects/create/Configure.tsx
index 9dca4915..0d003eed 100644
--- a/packages/frontend/src/components/projects/create/Configure.tsx
+++ b/packages/frontend/src/components/projects/create/Configure.tsx
@@ -538,7 +538,9 @@ const Configure = () => {
diff --git a/packages/frontend/src/components/projects/project/overview/Activity/AuctionCard.tsx b/packages/frontend/src/components/projects/project/overview/Activity/AuctionCard.tsx
index 5e93a1d4..b5e9ab39 100644
--- a/packages/frontend/src/components/projects/project/overview/Activity/AuctionCard.tsx
+++ b/packages/frontend/src/components/projects/project/overview/Activity/AuctionCard.tsx
@@ -42,31 +42,31 @@ export const AuctionCard = ({ project }: { project: Project }) => {
);
- const checkAuctionStatus = useCallback(async () => {
- const result = await client.getAuctionData(project.auctionId);
- setAuctionStatus(result.status);
- setAuctionDetails(result);
- }, [project.auctionId, project.deployers, project.fundsReleased]);
+ const checkAuctionStatus = useCallback(async () => {
+ const result = await client.getAuctionData(project.auctionId);
+ setAuctionStatus(result.status);
+ setAuctionDetails(result);
+ }, [project.auctionId, project.deployers, project.fundsReleased]);
- const fetchUpdatedProject = useCallback(async () => {
- const updatedProject = await client.getProject(project.id);
- setDeployers(updatedProject.project!.deployers!);
- setFundsStatus(updatedProject.project!.fundsReleased!);
- }, [project.id]);
+ const fetchUpdatedProject = useCallback(async () => {
+ const updatedProject = await client.getProject(project.id);
+ setDeployers(updatedProject.project!.deployers!);
+ setFundsStatus(updatedProject.project!.fundsReleased!);
+ }, [project.id]);
- const fetchData = useCallback(async () => {
- await Promise.all([checkAuctionStatus(), fetchUpdatedProject()]);
- }, [checkAuctionStatus, fetchUpdatedProject]);
+ const fetchData = useCallback(async () => {
+ await Promise.all([checkAuctionStatus(), fetchUpdatedProject()]);
+ }, [checkAuctionStatus, fetchUpdatedProject]);
- useEffect(() => {
+ useEffect(() => {
+ fetchData();
+
+ const timerId = setInterval(() => {
fetchData();
+ }, WAIT_DURATION);
- const timerId = setInterval(() => {
- fetchData();
- }, WAIT_DURATION);
-
- return () => clearInterval(timerId);
- }, [fetchData]);
+ return () => clearInterval(timerId);
+ }, [fetchData]);
const renderAuctionStatus = useCallback(
() => (
diff --git a/packages/frontend/src/context/WalletConnectContext.tsx b/packages/frontend/src/context/WalletConnectContext.tsx
index 6e8a6dd0..f7e46402 100644
--- a/packages/frontend/src/context/WalletConnectContext.tsx
+++ b/packages/frontend/src/context/WalletConnectContext.tsx
@@ -10,7 +10,6 @@ import {
import SignClient from '@walletconnect/sign-client';
import { getSdkError } from '@walletconnect/utils';
import { SessionTypes } from '@walletconnect/types';
-import { StargateClient } from '@cosmjs/stargate';
import { walletConnectModal } from '../utils/web3modal';
import {
@@ -46,10 +45,6 @@ export const WalletConnectClientProvider = ({
const isSignClientInitializing = useRef(false);
- const createCosmosClient = useCallback(async (endpoint: string) => {
- return await StargateClient.connect(endpoint);
- }, []);
-
const onSessionConnect = useCallback(async (session: SessionTypes.Struct) => {
setSession(session);
}, []);
@@ -166,6 +161,11 @@ export const WalletConnectClientProvider = ({
if (!session) {
return;
}
+ if (!session.namespaces['cosmos']) {
+ console.log('Accounts for cosmos namespace not found');
+ return;
+ }
+
const cosmosAddresses = session.namespaces['cosmos'].accounts;
const cosmosAccounts = cosmosAddresses.map((address) => ({
@@ -178,7 +178,7 @@ export const WalletConnectClientProvider = ({
};
populateAccounts();
- }, [session, createCosmosClient]);
+ }, [session]);
useEffect(() => {
if (!signClient) {