Skip to content

Commit

Permalink
Fix Mobile loading spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed Aug 17, 2024
1 parent 4d39833 commit 7269e91
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/views/WalletSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useWcUri } from '../../hooks/useWcUri'
import { useWallets } from '../../hooks/useWallets'
import { DeviceType } from '../../helpers/device'
import { ViewContainer } from '../layout/ViewContainer'
import { useRpc } from '../../contexts/FclContext'

type Props = {
onSelectWallet: (wallet: Wallet) => void
Expand Down Expand Up @@ -64,11 +65,11 @@ const MobileWrapper = ({
isLoading?: boolean
}) => {
const { isLoading: wcUriLoading } = useWcUri()
const { rpcEnabled } = useRpc()
const shouldShowLoading = (wcUriLoading && rpcEnabled) || isLoading

return (
<LoadingWrapper isLoading={wcUriLoading || isLoading}>
{children}
</LoadingWrapper>
<LoadingWrapper isLoading={shouldShowLoading}>{children}</LoadingWrapper>
)
}

Expand Down

0 comments on commit 7269e91

Please sign in to comment.