Skip to content

Commit

Permalink
fix: disbale claim btn if user has insufficient strif balance
Browse files Browse the repository at this point in the history
  • Loading branch information
LordCheta committed Dec 3, 2024
1 parent 42fae11 commit 23f6e2c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/pages/communities/nft/[address].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { CopyButton } from '@/components/CopyButton'
import { NftHoldersSection } from '@/app/communities/NftHoldersSection'
import { communitiesMapByContract } from '@/app/communities/communityUtils'
import { isUserRejectedTxError } from '@/components/ErrorPage/commonErrors'
import { useBalancesContext } from '@/app/user/Balances/context/BalancesContext'

/**
* Name of the local storage variable with information about whether the token was added to the wallet
Expand Down Expand Up @@ -189,9 +188,7 @@ export default function Page() {
}
}

const { balances } = useBalancesContext()
const { balance } = balances['RIF']
const hasEnoughBalance = Number(balance) > 0
const hasEnoughBalance = stRifBalance > (stRifThreshold ?? 0n)

if (!nftAddress) return null
return (
Expand Down

0 comments on commit 23f6e2c

Please sign in to comment.