diff --git a/apps/staking/src/components/AccountSummary/index.tsx b/apps/staking/src/components/AccountSummary/index.tsx index 17cf01bf47..0e4a3b1c89 100644 --- a/apps/staking/src/components/AccountSummary/index.tsx +++ b/apps/staking/src/components/AccountSummary/index.tsx @@ -115,11 +115,32 @@ export const AccountSummary = ({ transfer={api.deposit} enableWithZeroMax /> - + {availableToWithdraw === 0n ? ( + + + Withdraw + + + + You have no tokens available for withdrawal + + + + + + You can only withdraw tokens that are unlocked and not + staked in either OIS or Pyth Governance + + + + + ) : ( + + )} {api.type === ApiStateType.Loaded ? ( diff --git a/apps/staking/src/components/Dashboard/index.tsx b/apps/staking/src/components/Dashboard/index.tsx index 8b93da52d6..3d61e13068 100644 --- a/apps/staking/src/components/Dashboard/index.tsx +++ b/apps/staking/src/components/Dashboard/index.tsx @@ -126,7 +126,7 @@ export const Dashboard = ({ }, [tab]); return ( - + diff --git a/apps/staking/src/components/Header/help-menu.tsx b/apps/staking/src/components/Header/help-menu.tsx index 50ab4cdabe..0334fd5d6e 100644 --- a/apps/staking/src/components/Header/help-menu.tsx +++ b/apps/staking/src/components/Header/help-menu.tsx @@ -58,6 +58,12 @@ export const HelpMenu = () => { Data Publisher FAQ + + Data Publisher Guide + diff --git a/apps/staking/src/components/Menu/index.tsx b/apps/staking/src/components/Menu/index.tsx index 60cc49c16f..9c71f11b99 100644 --- a/apps/staking/src/components/Menu/index.tsx +++ b/apps/staking/src/components/Menu/index.tsx @@ -23,12 +23,12 @@ export const Menu = ({ ...props }: MenuProps) => ( {self} + + Publisher Guide + Publisher FAQ diff --git a/apps/staking/src/components/WalletButton/index.tsx b/apps/staking/src/components/WalletButton/index.tsx index 6aa7e3340e..594d3871d1 100644 --- a/apps/staking/src/components/WalletButton/index.tsx +++ b/apps/staking/src/components/WalletButton/index.tsx @@ -5,7 +5,6 @@ import { ArrowsRightLeftIcon, XCircleIcon, ChevronDownIcon, - TableCellsIcon, BanknotesIcon, ChevronRightIcon, CheckIcon, @@ -19,7 +18,6 @@ import { type ComponentProps, type ReactNode, useCallback, - useState, useMemo, type ReactElement, } from "react"; @@ -42,10 +40,8 @@ import { import { StateType as DataStateType, useData } from "../../hooks/use-data"; import { useLogger } from "../../hooks/use-logger"; import { usePrimaryDomain } from "../../hooks/use-primary-domain"; -import { AccountHistory } from "../AccountHistory"; import { Button } from "../Button"; import { Menu, MenuItem, Section, Separator } from "../Menu"; -import { ModalDialog } from "../ModalDialog"; import { TruncatedKey } from "../TruncatedKey"; const ONE_SECOND_IN_MS = 1000; @@ -103,10 +99,6 @@ const ConnectedButton = ({ api, ...props }: ConnectedButtonProps) => { - const [accountHistoryOpen, setAccountHistoryOpen] = useState(false); - const openAccountHistory = useCallback(() => { - setAccountHistoryOpen(true); - }, [setAccountHistoryOpen]); const modal = useWalletModal(); const showModal = useCallback(() => { modal.setVisible(true); @@ -120,61 +112,39 @@ const ConnectedButton = ({ }, [wallet, logger]); return ( - <> - - - - - - - - - {api.type === ApiStateType.Loaded && ( - <> - - - - Select stake account - - - - - Account history + + + + + + + + + {api.type === ApiStateType.Loaded && ( + <> + + + + Select stake account + - - - > - )} - - - Change wallet - - - Disconnect - - - - - {api.type === ApiStateType.Loaded && ( - - - - )} - > + + + > + )} + + + Change wallet + + + Disconnect + + + + ); }; @@ -206,47 +176,47 @@ const StakeAccountSelector = ({ children, api }: StakeAccountSelectorProps) => { } }, [data, api]); - if (accounts === undefined) { + return accounts === undefined || // eslint-disable-next-line unicorn/no-null - return null; - } else if (accounts.main === undefined) { - return accounts.other.length > 1 ? ( - - {children} - - {({ account }) => } - - - ) : // eslint-disable-next-line unicorn/no-null - null; - } else { - return ( - - {children} - - - Main Account - - - {accounts.other.length > 0 && ( - <> - - - - Other Accounts - - - {({ account }) => ( - - )} - - - > - )} - - - ); - } + (accounts.main === undefined && accounts.other.length === 1) ? null : ( + <> + + + {children} + + {accounts.main === undefined ? ( + ({ account }) => + ) : ( + <> + + + Main Account + + + + {accounts.other.length > 0 && ( + <> + + + + Other Accounts + + + {({ account }) => ( + + )} + + + > + )} + > + )} + + + + + > + ); }; type AccountMenuItemProps = {
+ You have no tokens available for withdrawal +