Open a long
diff --git a/apps/hyperdrive-trading/src/ui/hyperdrive/lp/AddLiquidityModalButton/AddLiquidityModalButton.tsx b/apps/hyperdrive-trading/src/ui/hyperdrive/lp/AddLiquidityModalButton/AddLiquidityModalButton.tsx index 74bc914d8..6c93bde2d 100644 --- a/apps/hyperdrive-trading/src/ui/hyperdrive/lp/AddLiquidityModalButton/AddLiquidityModalButton.tsx +++ b/apps/hyperdrive-trading/src/ui/hyperdrive/lp/AddLiquidityModalButton/AddLiquidityModalButton.tsx @@ -1,5 +1,6 @@ import { ChevronRightIcon, SquaresPlusIcon } from "@heroicons/react/24/outline"; import { ReactElement } from "react"; +import { useSearchParams } from "react-router-dom"; import { Hyperdrive } from "src/appconfig/types"; import { ChecklistItem } from "src/ui/base/components/ChecklistItem/ChecklistItem"; import { Modal } from "src/ui/base/components/Modal/Modal"; @@ -13,13 +14,25 @@ export function AddLiquidityModalButton({ }: { hyperdrive: Hyperdrive; }): ReactElement { + const [searchParams, setSearchParams] = useSearchParams(); return (Add Liquidity
diff --git a/apps/hyperdrive-trading/src/ui/hyperdrive/shorts/OpenShortModalButton/OpenShortModalButton.tsx b/apps/hyperdrive-trading/src/ui/hyperdrive/shorts/OpenShortModalButton/OpenShortModalButton.tsx index bd2ebcd79..350a1349b 100644 --- a/apps/hyperdrive-trading/src/ui/hyperdrive/shorts/OpenShortModalButton/OpenShortModalButton.tsx +++ b/apps/hyperdrive-trading/src/ui/hyperdrive/shorts/OpenShortModalButton/OpenShortModalButton.tsx @@ -1,5 +1,6 @@ import { BoltIcon, ChevronRightIcon } from "@heroicons/react/24/outline"; import { ReactElement } from "react"; +import { useSearchParams } from "react-router-dom"; import { Hyperdrive } from "src/appconfig/types"; import { ChecklistItem } from "src/ui/base/components/ChecklistItem/ChecklistItem"; import { Modal } from "src/ui/base/components/Modal/Modal"; @@ -13,6 +14,7 @@ export function OpenShortModalButton({ }: { hyperdrive: Hyperdrive; }): ReactElement { + const [searchParams, setSearchParams] = useSearchParams(); const { vaultRate } = useVaultRate({ // TODO: temporary for now until this available via addresses.json vaultAddress: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", @@ -23,7 +25,18 @@ export function OpenShortModalButton({ modalContent={Open a short