Skip to content

Commit

Permalink
formatting, linting
Browse files Browse the repository at this point in the history
  • Loading branch information
steezeburger committed Jan 7, 2025
1 parent 5baba53 commit e76a436
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 7 additions & 5 deletions web/src/components/WithdrawCard/WithdrawCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,13 @@ export default function WithdrawCard(): React.ReactElement {
Address: {fromAddress}
</p>
)}
{fromAddress && selectedEvmCurrency && !isLoadingSelectedEvmCurrencyBalance && (
<p className="mt-2 has-text-grey-lighter has-text-weight-semibold">
Balance: {selectedEvmCurrencyBalance}
</p>
)}
{fromAddress &&
selectedEvmCurrency &&
!isLoadingSelectedEvmCurrencyBalance && (
<p className="mt-2 has-text-grey-lighter has-text-weight-semibold">
Balance: {selectedEvmCurrencyBalance}
</p>
)}
{fromAddress && isLoadingSelectedEvmCurrencyBalance && (
<p className="mt-2 has-text-grey-lighter has-text-weight-semibold">
Balance: <i className="fas fa-spinner fa-pulse" />
Expand Down
12 changes: 9 additions & 3 deletions web/src/features/EvmWallet/contexts/EvmWalletContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ export const EvmWalletProvider: React.FC<EvmWalletProviderProps> = ({
const wagmiConfig = useConfig();
const userAccount = useAccount();

const { status: nativeBalanceStatus, data: nativeBalance, isLoading: isLoadingEvmNativeTokenBalance } = useBalance({
const {
status: nativeBalanceStatus,
data: nativeBalance,
isLoading: isLoadingEvmNativeTokenBalance,
} = useBalance({
address: userAccount.address,
});

Expand Down Expand Up @@ -144,8 +148,10 @@ export const EvmWalletProvider: React.FC<EvmWalletProviderProps> = ({
}),
[selectedEvmChain, selectedEvmCurrency],
);
const { balance: selectedEvmCurrencyBalance, isLoading: isLoadingSelectedEvmCurrencyBalance } =
useBalancePolling(getBalanceCallback, pollingConfig);
const {
balance: selectedEvmCurrencyBalance,
isLoading: isLoadingSelectedEvmCurrencyBalance,
} = useBalancePolling(getBalanceCallback, pollingConfig);

const selectedEvmChainNativeToken = useMemo(() => {
return selectedEvmChain?.currencies[0];
Expand Down

0 comments on commit e76a436

Please sign in to comment.