diff --git a/packages/apps/src/components/transfer-action.tsx b/packages/apps/src/components/transfer-action.tsx index 4ab557c95..f45f6041b 100644 --- a/packages/apps/src/components/transfer-action.tsx +++ b/packages/apps/src/components/transfer-action.tsx @@ -7,13 +7,13 @@ import { useTransfer } from "@/hooks/use-transfer"; import { isAddress } from "viem"; interface Props { - fee: { value: bigint } | undefined; recipient: Address | undefined; + transferable: bigint | undefined; transferValue: TransferValue; onTransfer: () => void; } -export default function TransferAction({ recipient, transferValue, onTransfer }: Props) { +export default function TransferAction({ recipient, transferable, transferValue, onTransfer }: Props) { const { sourceAllowance, sourceValue, targetValue, bridgeClient, fee, approve } = useTransfer(); const [busy, setBusy] = useState(false); const { chain } = useNetwork(); @@ -55,6 +55,8 @@ export default function TransferAction({ recipient, transferValue, onTransfer }: bridgeClient && fee?.value && transferValue.formatted && + transferable !== undefined && + transferValue.formatted <= transferable && isAddress(recipient || "") ) } diff --git a/packages/apps/src/components/transfer.tsx b/packages/apps/src/components/transfer.tsx index 97314c4d6..dd5cfb7cd 100644 --- a/packages/apps/src/components/transfer.tsx +++ b/packages/apps/src/components/transfer.tsx @@ -322,7 +322,7 @@ export default function Transfer() { {/* action */}