diff --git a/apps/staking/src/components/AccountSummary/index.tsx b/apps/staking/src/components/AccountSummary/index.tsx index cdb0a17ba..737970e1b 100644 --- a/apps/staking/src/components/AccountSummary/index.tsx +++ b/apps/staking/src/components/AccountSummary/index.tsx @@ -117,6 +117,7 @@ export const AccountSummary = ({ actionName="Add Tokens" max={walletAmount} transfer={api.deposit} + enableWithZeroMax /> diff --git a/apps/staking/src/components/TransferButton/index.tsx b/apps/staking/src/components/TransferButton/index.tsx index bd00a03ba..fba6ccab4 100644 --- a/apps/staking/src/components/TransferButton/index.tsx +++ b/apps/staking/src/components/TransferButton/index.tsx @@ -23,6 +23,7 @@ import { Tokens } from "../Tokens"; import PythTokensIcon from "../Tokens/pyth.svg"; type Props = Omit, "children"> & { + enableWithZeroMax?: boolean | undefined; actionName: ReactNode; actionDescription: ReactNode; title?: ReactNode | undefined; @@ -37,6 +38,7 @@ type Props = Omit, "children"> & { }; export const TransferButton = ({ + enableWithZeroMax, actionName, submitButtonText, actionDescription, @@ -49,7 +51,9 @@ export const TransferButton = ({ }: Props) => { const [closeDisabled, setCloseDisabled] = useState(false); - return transfer === undefined || isDisabled === true || max === 0n ? ( + return transfer === undefined || + isDisabled === true || + (max === 0n && !enableWithZeroMax) ? (