From b54a865d218c2df5ce848df2465e82584fb4d4b2 Mon Sep 17 00:00:00 2001 From: teodorus-nathaniel Date: Tue, 26 Dec 2023 23:19:50 +0700 Subject: [PATCH] fix: update subid url --- .../creators/CreatorDashboardSidebar.module.sass | 1 - src/components/utils/OffchainUtils.ts | 12 ++---------- 2 files changed, 2 insertions(+), 11 deletions(-) delete mode 100644 src/components/creators/CreatorDashboardSidebar.module.sass diff --git a/src/components/creators/CreatorDashboardSidebar.module.sass b/src/components/creators/CreatorDashboardSidebar.module.sass deleted file mode 100644 index a62911599..000000000 --- a/src/components/creators/CreatorDashboardSidebar.module.sass +++ /dev/null @@ -1 +0,0 @@ -@import 'src/styles/subsocial-vars.scss' diff --git a/src/components/utils/OffchainUtils.ts b/src/components/utils/OffchainUtils.ts index f9b81da74..9cef55a1e 100644 --- a/src/components/utils/OffchainUtils.ts +++ b/src/components/utils/OffchainUtils.ts @@ -60,12 +60,7 @@ export const getChainsInfo = async () => { } export const getTotalStake = async ({ address }: { address: string }) => { - const res = await axiosRequest( - `http://localhost:3001/api/v1/staking/creator/backer/ledger?account=${address}`, - ) - // const res = await axiosRequest( - // `${subIdApiUrl}/staking/creator/backer/ledger?account=${address}`, - // ) + const res = await axiosRequest(`${subIdApiUrl}/staking/creator/backer/ledger?account=${address}`) const totalStake = (res?.data?.totalLocked as string) || '' const stakeAmount = BigInt(totalStake) @@ -80,11 +75,8 @@ export const getStakeAmount = async ({ address: string }) => { const res = await axiosRequest( - `http://localhost:3001/api/v1/staking/creator/backer/info?account=${address}&ids=${spaceId}`, + `${subIdApiUrl}/staking/creator/backer/info?account=${address}&ids=${spaceId}`, ) - // const res = await axiosRequest( - // `${subIdApiUrl}/staking/creator/backer/info?account=${address}&ids=${spaceId}`, - // ) const newestStakeInfo = (res?.data?.[spaceId]?.[0] as { staked: string; era: number }) || {} const stakeAmount = BigInt(newestStakeInfo.staked)