diff --git a/packages/react-kit/src/components/wallet/ConnectButton.tsx b/packages/react-kit/src/components/wallet/ConnectButton.tsx index bdf06eb1d..f5d488922 100644 --- a/packages/react-kit/src/components/wallet/ConnectButton.tsx +++ b/packages/react-kit/src/components/wallet/ConnectButton.tsx @@ -89,10 +89,7 @@ export default function ConnectButton({ account && Sentry.setTag("wallet_address", account?.address); return ( -
+
{({ isMagicLoggedIn, chainId, globalAccount, disconnect }) => { diff --git a/packages/react-kit/src/components/widgets/finance/Finance.tsx b/packages/react-kit/src/components/widgets/finance/Finance.tsx index 4aa19ac81..9d5283d56 100644 --- a/packages/react-kit/src/components/widgets/finance/Finance.tsx +++ b/packages/react-kit/src/components/widgets/finance/Finance.tsx @@ -453,6 +453,10 @@ export default function Finance({ ); }, [pageCount, pageIndex]); + if (!address) { + return

Please connect your wallet

; + } + if (!isFundsInitialized || isLoadingSellerData || isLoadingExchangesTokens) { return ; } diff --git a/packages/react-kit/src/components/widgets/finance/FinanceWidget.tsx b/packages/react-kit/src/components/widgets/finance/FinanceWidget.tsx index 9a03f3f9a..a0b66ea24 100644 --- a/packages/react-kit/src/components/widgets/finance/FinanceWidget.tsx +++ b/packages/react-kit/src/components/widgets/finance/FinanceWidget.tsx @@ -37,6 +37,10 @@ import { useDisconnect } from "../../../hooks/connection/useDisconnect"; import { ethers } from "ethers"; dayjs.extend(isBetween); +const StyledConnectButton = styled(ConnectButton)` + padding: 10px; +`; + const Wrapper = styled.div` text-align: center; `; @@ -92,6 +96,13 @@ function WithSellerData(WrappedComponent: React.ComponentType) { ); } + if (address && !sellerIdToUse) { + return ( +

+ Connect a wallet that has a seller account +

+ ); + } const forcedAccount = sellerId && !sellerRoles.isAssistant ? seller?.assistant : ""; if ( @@ -171,7 +182,7 @@ export function FinanceWidget({ {!parentOrigin && ( - + )}