diff --git a/components/swap/SwapHistoryTable.tsx b/components/swap/SwapHistoryTable.tsx
index ec193887..c0a40694 100644
--- a/components/swap/SwapHistoryTable.tsx
+++ b/components/swap/SwapHistoryTable.tsx
@@ -341,7 +341,7 @@ const SwapHistoryTable = ({
)
) : (
-
+
Connect to view your swap history
diff --git a/components/trade/BalanceAndOpenOrders.tsx b/components/trade/BalanceAndOpenOrders.tsx
index 8d60452f..d357f606 100644
--- a/components/trade/BalanceAndOpenOrders.tsx
+++ b/components/trade/BalanceAndOpenOrders.tsx
@@ -2,8 +2,9 @@ import { Serum3Side } from '@blockworks-foundation/mango-v4'
import Button from '@components/shared/Button'
import SideBadge from '@components/shared/SideBadge'
import TabButtons from '@components/shared/TabButtons'
-import { QuestionMarkCircleIcon } from '@heroicons/react/20/solid'
+import { LinkIcon, QuestionMarkCircleIcon } from '@heroicons/react/20/solid'
import { Order } from '@project-serum/serum/lib/market'
+import { useWallet } from '@solana/wallet-adapter-react'
import mangoStore from '@store/mangoStore'
import { useTranslation } from 'next-i18next'
import Image from 'next/image'
@@ -135,6 +136,7 @@ const Balances = () => {
const OpenOrders = () => {
const { t } = useTranslation('common')
+ const { connected } = useWallet()
const openOrders = mangoStore((s) => s.mangoAccount.openOrders)
const handleCancelOrder = useCallback(
@@ -172,35 +174,46 @@ const OpenOrders = () => {
[t]
)
- return (
-
-
-
- Side |
- Size |
- Price |
- |
-
-
-
- {openOrders.map((o) => {
- return (
-
-
-
- |
- {o.size} |
- {o.price} |
-
-
- |
-
- )
- })}
-
-
+ return connected ? (
+ openOrders.length ? (
+
+
+
+ Side |
+ Size |
+ Price |
+ |
+
+
+
+ {openOrders.map((o) => {
+ return (
+
+
+
+ |
+ {o.size} |
+ {o.price} |
+
+
+ |
+
+ )
+ })}
+
+
+ ) : (
+
+ )
+ ) : (
+
+
+
Connect to view your open orders
+
)
}