diff --git a/apps/sentry-client-desktop/src/features/keys/HasKeys.tsx b/apps/sentry-client-desktop/src/features/keys/HasKeys.tsx index 220a92f54..d5c6f78cc 100644 --- a/apps/sentry-client-desktop/src/features/keys/HasKeys.tsx +++ b/apps/sentry-client-desktop/src/features/keys/HasKeys.tsx @@ -22,6 +22,7 @@ import {accruingStateAtom} from "@/hooks/useAccruingInfo"; import {ethers} from "ethers"; import {BiLoaderAlt} from "react-icons/bi"; import {useGetWalletBalance} from "@/hooks/useGetWalletBalance"; +import {useGetSingleWalletBalance} from "@/hooks/useGetSingleWalletBalance"; interface HasKeysProps { combinedOwners: string[], @@ -43,6 +44,8 @@ export function HasKeys({combinedOwners, combinedLicensesMap, statusMap, isWalle const {isLoading: isOperatorLoading, publicKey: operatorAddress} = useOperator(); const {startRuntime, sentryRunning} = useOperatorRuntime(); const {data: earnedEsxaiBalance} = useGetWalletBalance(combinedOwners); + const {data: singleWalletBalance} = useGetSingleWalletBalance(selectedWallet); + function startAssignment() { if (!isOperatorLoading) { @@ -309,19 +312,28 @@ export function HasKeys({combinedOwners, combinedLicensesMap, statusMap, isWalle
- {ethers.formatEther( - earnedEsxaiBalance.reduce((acc, item) => acc + item.esXaiBalance, BigInt(0)) - )} + {ethers.formatEther(singleWalletBalance.esXaiBalance)}
- Loading... -
+ earnedEsxaiBalance ? ( ++ {ethers.formatEther( + earnedEsxaiBalance.reduce((acc, item) => acc + item.esXaiBalance, BigInt(0)) + )} +
++ Loading... +
+ ) )} +