Skip to content

Commit

Permalink
fix: applied suggestion from oskar
Browse files Browse the repository at this point in the history
  • Loading branch information
eniolam1000752 committed Nov 21, 2023
1 parent f98d9d9 commit b002ae1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/modules/token/fungible/components/SendForm/SendForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ const SendForm = (props) => {
feeToken,
isLoading: isLoadingFeeBalance,
} = useValidateFeeBalance();
const hasTokenWithBalance = tokenBalanceQuery.data?.data?.some(
(tokenBalance) => BigInt(tokenBalance?.availableBalance || 0) > BigInt(0)
);

const mainChainApplication = useMemo(
() => managedApps.find(({ chainID }) => /0{4}$/.test(chainID)),
Expand Down Expand Up @@ -131,6 +128,10 @@ const SendForm = (props) => {

useEffect(() => {
if (!isLoadingFeeBalance && !tokenBalanceQuery.isLoading) {
const hasTokenWithBalance = tokenBalanceQuery.data?.data?.some(
(tokenBalance) => BigInt(tokenBalance?.availableBalance || 0) > BigInt(0)
);

const tokenBalanceError = getTokenBalanceErrorMessage({
errorType: 'sendToken',
hasSufficientBalanceForFee,
Expand Down

0 comments on commit b002ae1

Please sign in to comment.