Skip to content

Commit

Permalink
fix: update subid url
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Dec 26, 2023
1 parent 52139bc commit b54a865
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.

This file was deleted.

12 changes: 2 additions & 10 deletions src/components/utils/OffchainUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down

0 comments on commit b54a865

Please sign in to comment.