Skip to content

Commit

Permalink
fix: endless loading in ledger mode
Browse files Browse the repository at this point in the history
  • Loading branch information
alter-eggo committed Dec 17, 2024
1 parent 90ec152 commit 33881cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/app/common/hooks/balance/use-total-balance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ export function useTotalBalance({ btcAddress, stxAddress }: UseTotalBalanceArgs)
return {
isFetching: isFetchingStxBalance || isFetchingBtcBalance,
isLoading: isLoadingStxBalance || isLoadingBtcBalance,
isPending: isPendingStxBalance || isPendingBtcBalance,
isPending:
(isPendingStxBalance && Boolean(stxAddress)) ||
(isPendingBtcBalance && Boolean(btcAddress)),
totalBalance,
totalUsdBalance: i18nFormatCurrency(
totalBalance,
Expand All @@ -69,5 +71,7 @@ export function useTotalBalance({ btcAddress, stxAddress }: UseTotalBalanceArgs)
stxMarketData,
isLoadingAdditionalDataBtcBalance,
isLoadingAdditionalDataStxBalance,
stxAddress,
btcAddress,
]);
}
2 changes: 1 addition & 1 deletion src/app/ui/components/account/account.card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function AccountCard({
</Flex>
<Flex flexDir={{ base: 'column', md: 'row' }} justify="space-between">
<Box mb="space.05" mt="space.04">
<SkeletonLoader width="200px" height="38px" isLoading={isLoadingBalance}>
<SkeletonLoader width="200px" height="46px" isLoading={isLoadingBalance}>
<styled.h1
textStyle="heading.02"
data-state={isLoadingAdditionalData ? 'loading' : undefined}
Expand Down

0 comments on commit 33881cc

Please sign in to comment.