@@ -34,7 +35,7 @@ const ChainSelector = (): JSX.Element => {
) : (
)}
- {toTitle(option)}
+ {toTitle(option)}
))}
diff --git a/src/components/GetToken/index.tsx b/src/components/GetToken/index.tsx
index b0de027f..c426e7c7 100644
--- a/src/components/GetToken/index.tsx
+++ b/src/components/GetToken/index.tsx
@@ -95,8 +95,8 @@ export const GetToken = () => {
{showCurrentToken}
GET {tokenSymbol}
-
-
GET
+
From dca8605042e612a2f94b410ac9ab52f74b550281 Mon Sep 17 00:00:00 2001
From: Kacper Szarkiewicz
Date: Tue, 2 Jul 2024 22:10:20 +0200
Subject: [PATCH 41/50] hide jumping arrow tooltip on mobile
---
src/components/GetToken/index.tsx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/components/GetToken/index.tsx b/src/components/GetToken/index.tsx
index c426e7c7..87ab6297 100644
--- a/src/components/GetToken/index.tsx
+++ b/src/components/GetToken/index.tsx
@@ -9,6 +9,7 @@ import { useAccountBalance } from '../../shared/useAccountBalance';
import useSwitchChain from '../../hooks/useSwitchChain';
import { useNodeInfoState } from '../../NodeInfoProvider';
import { TenantName } from '../../models/Tenant';
+import { isDesktop } from 'react-device-detect';
const tenantColors = {
[TenantName.Pendulum]: {
@@ -81,12 +82,13 @@ export const GetToken = () => {
const showCurrentToken = getTokenIcon(currentTenant)
return (
- {isBalanceZero && (
+ {(isBalanceZero && isDesktop) ? (
<>
>
- )}
+ ) : <>>
+ }
{tokenSymbol ? (
From 2a60174acfa9315ce76639952a701dc80abadf60 Mon Sep 17 00:00:00 2001
From: Kacper Szarkiewicz
Date: Tue, 2 Jul 2024 22:39:48 +0200
Subject: [PATCH 42/50] fix ChainSelector on mobile
---
src/components/ChainSelector.tsx | 37 ++++++++++++++++----------------
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/src/components/ChainSelector.tsx b/src/components/ChainSelector.tsx
index c61bb3ba..a98fca5e 100644
--- a/src/components/ChainSelector.tsx
+++ b/src/components/ChainSelector.tsx
@@ -1,22 +1,19 @@
import { ChevronDownIcon } from '@heroicons/react/20/solid';
-import { Button, Dropdown } from 'react-daisyui';
+import { isDesktop } from 'react-device-detect';
import AmplitudeLogo from '../assets/AmplitudeLogo';
import PendulumLogo from '../assets/PendulumLogo';
import { toTitle } from '../helpers/string';
import useSwitchChain from '../hooks/useSwitchChain';
import { TenantName } from '../models/Tenant';
-import { isDesktop } from 'react-device-detect';
const options = [TenantName.Pendulum, TenantName.Amplitude, TenantName.Foucoco];
const ChainSelector = (): JSX.Element => {
const { switchChain, currentTenant } = useSwitchChain();
return (
-
-
+
{currentTenant === TenantName.Pendulum ? (
@@ -26,20 +23,22 @@ const ChainSelector = (): JSX.Element => {
)}
{isDesktop ? {currentTenant ? toTitle(currentTenant) : ''} : <>>}
-
-
+
+
-
+
+
);
};
From 65e1998cbcc53e6a7ef8d11cb0edaf4f60e70025 Mon Sep 17 00:00:00 2001
From: Kacper Szarkiewicz
Date: Tue, 2 Jul 2024 22:45:20 +0200
Subject: [PATCH 43/50] add space in Connect Wallet button
---
src/components/Wallet/modals/ConnectModal/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/Wallet/modals/ConnectModal/index.tsx b/src/components/Wallet/modals/ConnectModal/index.tsx
index 37317705..85f3a620 100644
--- a/src/components/Wallet/modals/ConnectModal/index.tsx
+++ b/src/components/Wallet/modals/ConnectModal/index.tsx
@@ -18,7 +18,7 @@ export const ConnectModal = ({ isHeader }: ConnectProps) => {
type="button"
onClick={() => setVisible(true)}
>
- Connect Wallet
+ Connect Wallet
Date: Tue, 2 Jul 2024 22:50:07 +0200
Subject: [PATCH 44/50] add max width for mobile wallet account name
---
src/components/Wallet/modals/DisconnectModal/index.tsx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/components/Wallet/modals/DisconnectModal/index.tsx b/src/components/Wallet/modals/DisconnectModal/index.tsx
index cc668ead..c524f6da 100644
--- a/src/components/Wallet/modals/DisconnectModal/index.tsx
+++ b/src/components/Wallet/modals/DisconnectModal/index.tsx
@@ -23,7 +23,7 @@ const WalletButton = ({ wallet, query, balance, tokenSymbol, walletAccount }: Wa
@@ -34,7 +34,7 @@ const WalletButton = ({ wallet, query, balance, tokenSymbol, walletAccount }: Wa
{balance} {tokenSymbol}
)}
- {walletAccount?.name}
+ {walletAccount?.name}
);
@@ -65,11 +65,11 @@ const WalletDropdownMenu = ({
inline={true}
/>
-
+
{balance} {tokenSymbol}
-
+
Disconnect
From 8f93499bf6a0cc185ec1cb8601f74b0e08df3f53 Mon Sep 17 00:00:00 2001
From: Kacper Szarkiewicz
Date: Thu, 11 Jul 2024 11:21:50 +0200
Subject: [PATCH 45/50] move Dialog into components directory
---
.../dialogs/Dialog.tsx => components/Dialog/index.tsx} | 3 +--
.../Wallet/modals/ConnectModal/ConnectModalDialog.tsx | 6 +++---
src/components/nabla/Pools/Backstop/BackstopPoolModals.tsx | 2 +-
src/components/nabla/Pools/Swap/SwapPoolModals.tsx | 2 +-
src/components/nabla/common/PoolSelectorModal.tsx | 2 +-
src/components/nabla/common/SwapProgress.tsx | 2 +-
src/pages/gas/GasSuccessDialog.tsx | 2 +-
src/pages/spacewalk/bridge/Issue/ConfirmationDialog.tsx | 4 ++--
src/pages/spacewalk/bridge/Issue/SettingsDialog.tsx | 2 +-
src/pages/spacewalk/bridge/Redeem/ConfirmationDialog.tsx | 2 +-
.../spacewalk/bridge/TransferDialog/TransferDialog.tsx | 2 +-
src/pages/spacewalk/transactions/TransactionDialog.tsx | 2 +-
.../transactions/TransferDialog/TransferDialog.tsx | 4 ++--
src/pages/staking/dialogs/ClaimRewardsDialog.tsx | 4 ++--
src/pages/staking/dialogs/ConfirmDelegateDialog.tsx | 2 +-
src/pages/staking/dialogs/DelegateToCollatorDialog.tsx | 2 +-
src/pages/staking/dialogs/DelegationSuccessfulDialog.tsx | 2 +-
src/pages/staking/dialogs/unlock/UnlockDialog.tsx | 2 +-
18 files changed, 23 insertions(+), 24 deletions(-)
rename src/{pages/staking/dialogs/Dialog.tsx => components/Dialog/index.tsx} (97%)
diff --git a/src/pages/staking/dialogs/Dialog.tsx b/src/components/Dialog/index.tsx
similarity index 97%
rename from src/pages/staking/dialogs/Dialog.tsx
rename to src/components/Dialog/index.tsx
index 6c8dc13c..649f39ab 100644
--- a/src/pages/staking/dialogs/Dialog.tsx
+++ b/src/components/Dialog/index.tsx
@@ -1,7 +1,6 @@
import { Modal } from 'react-daisyui';
import { FC, createPortal, useCallback, useEffect, useRef, useState } from 'preact/compat';
-
-import { CloseButton } from '../../../components/CloseButton';
+import { CloseButton } from '../CloseButton';
interface DialogProps {
visible: boolean;
diff --git a/src/components/Wallet/modals/ConnectModal/ConnectModalDialog.tsx b/src/components/Wallet/modals/ConnectModal/ConnectModalDialog.tsx
index 6ba5d5fe..c440a302 100644
--- a/src/components/Wallet/modals/ConnectModal/ConnectModalDialog.tsx
+++ b/src/components/Wallet/modals/ConnectModal/ConnectModalDialog.tsx
@@ -1,10 +1,10 @@
import { Collapse } from 'react-daisyui';
-import { Dialog } from '../../../../pages/staking/dialogs/Dialog';
+import { useWalletConnection } from '../../../../hooks/useWalletConnection';
+import { METAMASK_EXTENSION_NAME } from '../../../../services/metamask';
+import { Dialog } from '../../../Dialog';
import { ConnectModalWalletsList } from './ConnectModalList/ConnectModalWalletsList';
import { ConnectModalAccountsList } from './ConnectModalList/ConnectModalAccountsList';
import { ConnectModalDialogLoading } from './ConnectModalDialogLoading';
-import { useWalletConnection } from '../../../../hooks/useWalletConnection';
-import { METAMASK_EXTENSION_NAME } from '../../../../services/metamask';
interface ConnectModalDialogProps {
visible: boolean;
diff --git a/src/components/nabla/Pools/Backstop/BackstopPoolModals.tsx b/src/components/nabla/Pools/Backstop/BackstopPoolModals.tsx
index 90d4daab..e67d35b2 100644
--- a/src/components/nabla/Pools/Backstop/BackstopPoolModals.tsx
+++ b/src/components/nabla/Pools/Backstop/BackstopPoolModals.tsx
@@ -3,7 +3,7 @@ import { NablaInstanceBackstopPool } from '../../../../hooks/nabla/useNablaInsta
import { ModalTypes, useModal } from '../../../../services/modal';
import AddLiquidity from './AddLiquidity';
import WithdrawLiquidity from './WithdrawLiquidity';
-import { Dialog } from '../../../../pages/staking/dialogs/Dialog';
+import { Dialog } from '../../../Dialog';
export type LiquidityModalProps = {
data?: NablaInstanceBackstopPool;
diff --git a/src/components/nabla/Pools/Swap/SwapPoolModals.tsx b/src/components/nabla/Pools/Swap/SwapPoolModals.tsx
index bae21bc1..03a96e56 100644
--- a/src/components/nabla/Pools/Swap/SwapPoolModals.tsx
+++ b/src/components/nabla/Pools/Swap/SwapPoolModals.tsx
@@ -1,6 +1,6 @@
import { FunctionalComponent } from 'preact';
import { ModalTypes, useModal } from '../../../../services/modal';
-import { Dialog } from '../../../../pages/staking/dialogs/Dialog';
+import { Dialog } from '../../../Dialog';
import { SwapPoolColumn } from './columns';
import AddLiquidity from './AddLiquidity';
import Redeem from './Redeem';
diff --git a/src/components/nabla/common/PoolSelectorModal.tsx b/src/components/nabla/common/PoolSelectorModal.tsx
index 49a76d15..5f820e91 100644
--- a/src/components/nabla/common/PoolSelectorModal.tsx
+++ b/src/components/nabla/common/PoolSelectorModal.tsx
@@ -8,7 +8,7 @@ import { repeat } from '../../../helpers/general';
import { Skeleton } from '../../Skeleton';
import { NablaInstanceBackstopPool, NablaInstanceSwapPool } from '../../../hooks/nabla/useNablaInstance';
import { getIcon } from '../../../shared/AssetIcons';
-import { Dialog } from '../../../pages/staking/dialogs/Dialog';
+import { Dialog } from '../../Dialog';
export type PoolEntry =
| { type: 'swapPool'; pool: NablaInstanceSwapPool }
diff --git a/src/components/nabla/common/SwapProgress.tsx b/src/components/nabla/common/SwapProgress.tsx
index 9d974c63..83330328 100644
--- a/src/components/nabla/common/SwapProgress.tsx
+++ b/src/components/nabla/common/SwapProgress.tsx
@@ -1,6 +1,6 @@
import { JSX } from 'preact';
import { TransactionProgress, TransactionProgressProps } from '../common/TransactionProgress';
-import { Dialog } from '../../../pages/staking/dialogs/Dialog';
+import { Dialog } from '../../Dialog';
export type SwapProgressProps = {
open: boolean;
diff --git a/src/pages/gas/GasSuccessDialog.tsx b/src/pages/gas/GasSuccessDialog.tsx
index ab5cc192..06f2b8cf 100644
--- a/src/pages/gas/GasSuccessDialog.tsx
+++ b/src/pages/gas/GasSuccessDialog.tsx
@@ -1,7 +1,7 @@
import { FC } from 'preact/compat';
import { Button } from 'react-daisyui';
import SuccessDialogIcon from '../../assets/dialog-status-success';
-import { Dialog } from '../staking/dialogs/Dialog';
+import { Dialog } from '../../components/Dialog';
interface DialogProps {
visible: boolean;
diff --git a/src/pages/spacewalk/bridge/Issue/ConfirmationDialog.tsx b/src/pages/spacewalk/bridge/Issue/ConfirmationDialog.tsx
index be9304c3..a1c8ea4b 100644
--- a/src/pages/spacewalk/bridge/Issue/ConfirmationDialog.tsx
+++ b/src/pages/spacewalk/bridge/Issue/ConfirmationDialog.tsx
@@ -7,10 +7,10 @@ import { convertCurrencyToStellarAsset, deriveShortenedRequestId } from '../../.
import { convertRawHexKeyToPublicKey } from '../../../../helpers/stellar';
import { RichIssueRequest } from '../../../../hooks/spacewalk/useIssuePallet';
import { nativeStellarToDecimal } from '../../../../shared/parseNumbers/metric';
-import { Dialog } from '../../../staking/dialogs/Dialog';
+import { Dialog } from '../../../../components/Dialog';
import { generateSEP0007URIScheme } from '../../../../helpers/stellar/sep0007';
-import { StellarUriScheme } from './StellarURIScheme';
import { PENDULUM_SUPPORT_CHAT_URL } from '../../../../shared/constants';
+import { StellarUriScheme } from './StellarURIScheme';
interface ConfirmationDialogProps {
issueRequest: RichIssueRequest | undefined;
diff --git a/src/pages/spacewalk/bridge/Issue/SettingsDialog.tsx b/src/pages/spacewalk/bridge/Issue/SettingsDialog.tsx
index 8d5284f9..de7f244c 100644
--- a/src/pages/spacewalk/bridge/Issue/SettingsDialog.tsx
+++ b/src/pages/spacewalk/bridge/Issue/SettingsDialog.tsx
@@ -3,7 +3,7 @@ import { useMemo } from 'preact/hooks';
import { ChangeEvent } from 'preact/compat';
import VaultSelector from '../../../../components/Selector/VaultSelector';
import useBridgeSettings from '../../../../hooks/spacewalk/useBridgeSettings';
-import { Dialog } from '../../../staking/dialogs/Dialog';
+import { Dialog } from '../../../../components/Dialog';
import { BridgeDirection } from '../index';
interface Props {
diff --git a/src/pages/spacewalk/bridge/Redeem/ConfirmationDialog.tsx b/src/pages/spacewalk/bridge/Redeem/ConfirmationDialog.tsx
index c7fd314e..5ad69de2 100644
--- a/src/pages/spacewalk/bridge/Redeem/ConfirmationDialog.tsx
+++ b/src/pages/spacewalk/bridge/Redeem/ConfirmationDialog.tsx
@@ -5,7 +5,7 @@ import { PublicKey } from '../../../../components/PublicKey';
import { convertCurrencyToStellarAsset } from '../../../../helpers/spacewalk';
import { RichRedeemRequest } from '../../../../hooks/spacewalk/useRedeemPallet';
import { nativeStellarToDecimal } from '../../../../shared/parseNumbers/metric';
-import { Dialog } from '../../../staking/dialogs/Dialog';
+import { Dialog } from '../../../../components/Dialog';
import { useMemo } from 'preact/hooks';
import { PENDULUM_SUPPORT_CHAT_URL } from '../../../../shared/constants';
import { PAGES_PATHS } from '../../../../app';
diff --git a/src/pages/spacewalk/bridge/TransferDialog/TransferDialog.tsx b/src/pages/spacewalk/bridge/TransferDialog/TransferDialog.tsx
index ca8a31a9..e5866229 100644
--- a/src/pages/spacewalk/bridge/TransferDialog/TransferDialog.tsx
+++ b/src/pages/spacewalk/bridge/TransferDialog/TransferDialog.tsx
@@ -11,7 +11,7 @@ import { toTitle } from '../../../../helpers/string';
import { useVaultRegistryPallet } from '../../../../hooks/spacewalk/useVaultRegistryPallet';
import { nativeToDecimal } from '../../../../shared/parseNumbers/metric';
import { TTransfer } from '../../transactions/TransactionsColumns';
-import { Dialog } from '../../../staking/dialogs/Dialog';
+import { Dialog } from '../../../../components/Dialog';
export interface BaseTransferDialogProps {
id: string;
diff --git a/src/pages/spacewalk/transactions/TransactionDialog.tsx b/src/pages/spacewalk/transactions/TransactionDialog.tsx
index 6f801baa..333a2f1d 100644
--- a/src/pages/spacewalk/transactions/TransactionDialog.tsx
+++ b/src/pages/spacewalk/transactions/TransactionDialog.tsx
@@ -21,7 +21,7 @@ import { toTitle } from '../../../helpers/string';
import { useSecurityPallet } from '../../../hooks/spacewalk/useSecurityPallet';
import { useVaultRegistryPallet } from '../../../hooks/spacewalk/useVaultRegistryPallet';
import { nativeToDecimal } from '../../..//shared/parseNumbers/metric';
-import { Dialog } from '../../staking/dialogs/Dialog';
+import { Dialog } from '../../../components/Dialog';
import { TTransfer, TransferType } from './TransactionsColumns';
import { PENDULUM_SUPPORT_CHAT_URL } from '../../../shared/constants';
diff --git a/src/pages/spacewalk/transactions/TransferDialog/TransferDialog.tsx b/src/pages/spacewalk/transactions/TransferDialog/TransferDialog.tsx
index 53c4205e..b0ea0e5a 100644
--- a/src/pages/spacewalk/transactions/TransferDialog/TransferDialog.tsx
+++ b/src/pages/spacewalk/transactions/TransferDialog/TransferDialog.tsx
@@ -4,14 +4,14 @@ import { JSXInternal } from 'preact/src/jsx';
import { Divider } from 'react-daisyui';
import { useGlobalState } from '../../../../GlobalStateProvider';
-import { CopyableAddress } from '../../../../components/PublicKey';
import { deriveShortenedRequestId } from '../../../../helpers/spacewalk';
import { convertRawHexKeyToPublicKey } from '../../../../helpers/stellar';
import { toTitle } from '../../../../helpers/string';
import { useVaultRegistryPallet } from '../../../../hooks/spacewalk/useVaultRegistryPallet';
import { nativeToDecimal } from '../../../../shared/parseNumbers/metric';
+import { CopyableAddress } from '../../../../components/PublicKey';
+import { Dialog } from '../../../../components/Dialog';
import { TTransfer } from '../TransactionsColumns';
-import { Dialog } from '../../../staking/dialogs/Dialog';
export interface BaseTransferDialogProps {
id: string;
diff --git a/src/pages/staking/dialogs/ClaimRewardsDialog.tsx b/src/pages/staking/dialogs/ClaimRewardsDialog.tsx
index 6c2acada..706fc3dd 100644
--- a/src/pages/staking/dialogs/ClaimRewardsDialog.tsx
+++ b/src/pages/staking/dialogs/ClaimRewardsDialog.tsx
@@ -6,12 +6,12 @@ import { useGlobalState } from '../../../GlobalStateProvider';
import { useNodeInfoState } from '../../../NodeInfoProvider';
import SuccessDialogIcon from '../../../assets/dialog-status-success';
import Amount from '../../../components/Form/Amount';
+import { Dialog } from '../../../components/Dialog';
import { getErrors } from '../../../helpers/substrate';
import { ParachainStakingInflationInflationInfo, useStakingPallet } from '../../../hooks/staking/useStakingPallet';
import { nativeToDecimal } from '../../../shared/parseNumbers/metric';
-import { getClaimingValidationSchema } from './ValidationSchema';
import { ToastMessage, showToast } from '../../../shared/showToast';
-import { Dialog } from './Dialog';
+import { getClaimingValidationSchema } from './ValidationSchema';
interface Props {
userRewardsBalance?: string;
diff --git a/src/pages/staking/dialogs/ConfirmDelegateDialog.tsx b/src/pages/staking/dialogs/ConfirmDelegateDialog.tsx
index 74759556..72f330d1 100644
--- a/src/pages/staking/dialogs/ConfirmDelegateDialog.tsx
+++ b/src/pages/staking/dialogs/ConfirmDelegateDialog.tsx
@@ -3,8 +3,8 @@ import { useCallback, useMemo, useState } from 'preact/hooks';
import { Button } from 'react-daisyui';
import { nativeToDecimal, nativeToFormatMetric } from '../../../shared/parseNumbers/metric';
+import { Dialog } from '../../../components/Dialog';
import { DelegationMode } from './ExecuteDelegationDialogs';
-import { Dialog } from './Dialog';
interface ConfirmDelegateDialogProps {
availableBalance?: string;
diff --git a/src/pages/staking/dialogs/DelegateToCollatorDialog.tsx b/src/pages/staking/dialogs/DelegateToCollatorDialog.tsx
index d63866a2..d39e7598 100644
--- a/src/pages/staking/dialogs/DelegateToCollatorDialog.tsx
+++ b/src/pages/staking/dialogs/DelegateToCollatorDialog.tsx
@@ -5,6 +5,7 @@ import { useForm } from 'react-hook-form';
import ChainLogo from '../../../assets/ChainLogo';
import Amount from '../../../components/Form/Amount';
import { PublicKey } from '../../../components/PublicKey';
+import { Dialog } from '../../../components/Dialog';
import {
ParachainStakingCandidate,
ParachainStakingInflationInflationInfo,
@@ -12,7 +13,6 @@ import {
import { nativeToDecimal } from '../../../shared/parseNumbers/metric';
import { DelegationMode } from './ExecuteDelegationDialogs';
import { FormValues, getStakingValidationSchema } from './ValidationSchema';
-import { Dialog } from './Dialog';
interface DelegateToCollatorDialogProps {
availableBalance?: string;
diff --git a/src/pages/staking/dialogs/DelegationSuccessfulDialog.tsx b/src/pages/staking/dialogs/DelegationSuccessfulDialog.tsx
index bc42e2d6..49fd6c3b 100644
--- a/src/pages/staking/dialogs/DelegationSuccessfulDialog.tsx
+++ b/src/pages/staking/dialogs/DelegationSuccessfulDialog.tsx
@@ -1,6 +1,6 @@
import { Button } from 'react-daisyui';
import SuccessDialogIcon from '../../../assets/dialog-status-success';
-import { Dialog } from './Dialog';
+import { Dialog } from '../../../components/Dialog';
interface DelegationSuccessfulDialogProps {
visible: boolean;
diff --git a/src/pages/staking/dialogs/unlock/UnlockDialog.tsx b/src/pages/staking/dialogs/unlock/UnlockDialog.tsx
index 670b2006..5dc78917 100644
--- a/src/pages/staking/dialogs/unlock/UnlockDialog.tsx
+++ b/src/pages/staking/dialogs/unlock/UnlockDialog.tsx
@@ -7,8 +7,8 @@ import Big from 'big.js';
import { nativeToDecimal } from '../../../../shared/parseNumbers/metric';
import { useGlobalState } from '../../../../GlobalStateProvider';
+import { Dialog } from '../../../../components/Dialog';
-import { Dialog } from '../Dialog';
import { SuccessStep } from '../steps/SuccessStep';
import { getUnlockValidationSchema } from './UnlockValidationSchema';
From 37385345eccf1c86b1a482dda430adf15a41c7dc Mon Sep 17 00:00:00 2001
From: Kacper Szarkiewicz
Date: Tue, 23 Jul 2024 12:17:57 +0200
Subject: [PATCH 46/50] improve ConnectModalDialog design
---
src/components/GetToken/index.tsx | 36 +++++++++----------
src/components/SearchInput/index.tsx | 2 ++
.../ConnectModal/ConnectModalDialog.tsx | 18 +++++++---
3 files changed, 34 insertions(+), 22 deletions(-)
diff --git a/src/components/GetToken/index.tsx b/src/components/GetToken/index.tsx
index 592dc9c1..a3710bae 100644
--- a/src/components/GetToken/index.tsx
+++ b/src/components/GetToken/index.tsx
@@ -75,37 +75,37 @@ export const GetToken = () => {
const { currentTenant } = useSwitchChain();
const { tokenSymbol } = useNodeInfoState().state;
+ if (!tokenSymbol) return <>>;
+
const link = `/${currentTenant}/gas`;
const isBalanceZero = Number(total) === 0;
- const showCurrentToken = getTokenIcon(currentTenant)
+ const showCurrentToken = getTokenIcon(currentTenant);
+
return (
- {(isBalanceZero && isDesktop) ? (
+ {isBalanceZero && isDesktop ? (
<>
>
- ) : <>>
- }
-
- {tokenSymbol ? (
-
-
-
- {showCurrentToken}
-
GET {tokenSymbol}
-
-
-
GET
- {showCurrentToken}
-
-
-
) : (
<>>
)}
+
+
+
+
+ {showCurrentToken}
+
GET {tokenSymbol}
+
+
+
GET
+ {showCurrentToken}
+
+
+
);
};
diff --git a/src/components/SearchInput/index.tsx b/src/components/SearchInput/index.tsx
index 0c8e65f9..5f1ec107 100644
--- a/src/components/SearchInput/index.tsx
+++ b/src/components/SearchInput/index.tsx
@@ -9,9 +9,11 @@ export const SearchInput = ({ set, ...p }: SearchInputProps) => (