Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ponderingdemocritus committed Jan 22, 2024
1 parent 12d459e commit 7becbfd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions apps/nextjs/src/app/staking/StakingContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ export const StakingContainer = () => {
// query: { enabled: !!address && !!poolTotal },
});

console.log(poolTotal);

useEffect(() => {
if (isFetched && poolWithdrawlsData && !calculatedPoolAmount) {
if (isFetched && poolWithdrawlsData && !calculatedPoolAmount && poolTotal) {
console.log("poolWithdrawlsData", poolWithdrawlsData);
const claimable = poolTotal - poolWithdrawlsData;
setPoolClaimAmount(claimable);
Expand Down Expand Up @@ -231,11 +233,7 @@ export const StakingContainer = () => {
{formatEther(poolTotal ?? 0n).toLocaleString() ?? 0n}
</span>
<Button
disabled={
poolClaimAmount == 0n ||
isPoolClaimLoading ||
poolClaimAmount == undefined
}
disabled={poolClaimAmount == 0n || isPoolClaimLoading}
size={"sm"}
className="self-center"
variant={"outline"}
Expand Down

0 comments on commit 7becbfd

Please sign in to comment.