From 01dca4ebd4b3ab5d5d8ead2db0f098168cf448c3 Mon Sep 17 00:00:00 2001 From: Ran Cohen Date: Wed, 19 Oct 2022 15:57:01 +0300 Subject: [PATCH] fixed data not being transfer to some modals --- .../v3/earningsTable/menu/V3EarningTableMenuMain.tsx | 2 +- src/elements/earn/portfolio/v3/holdings/V3HoldingPage.tsx | 6 +++--- .../earn/portfolio/v3/holdings/V3HoldingsItemUnstaked.tsx | 2 +- .../earn/portfolio/v3/holdings/V3HoldingsItemWithdraw.tsx | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/elements/earn/portfolio/v3/earningsTable/menu/V3EarningTableMenuMain.tsx b/src/elements/earn/portfolio/v3/earningsTable/menu/V3EarningTableMenuMain.tsx index 433e0d0c..db1c7969 100644 --- a/src/elements/earn/portfolio/v3/earningsTable/menu/V3EarningTableMenuMain.tsx +++ b/src/elements/earn/portfolio/v3/earningsTable/menu/V3EarningTableMenuMain.tsx @@ -22,7 +22,7 @@ export const V3EarningTableMenuMain = memo( const { pushModal } = useModal(); const handleWithdrawClick = useCallback(() => { - pushModal({ modalName: ModalNames.V3Withdraw, data: holding }); + pushModal({ modalName: ModalNames.V3Withdraw, data: { holding } }); }, [holding, pushModal]); const handleBonusClick = useCallback(() => { diff --git a/src/elements/earn/portfolio/v3/holdings/V3HoldingPage.tsx b/src/elements/earn/portfolio/v3/holdings/V3HoldingPage.tsx index 7d37ca9a..12ae9b87 100644 --- a/src/elements/earn/portfolio/v3/holdings/V3HoldingPage.tsx +++ b/src/elements/earn/portfolio/v3/holdings/V3HoldingPage.tsx @@ -213,7 +213,7 @@ export const V3HoldingPage = () => { onClick={() => pushModal({ modalName: ModalNames.DepositV3, - data: pool, + data: { pool }, }) } size={ButtonSize.ExtraSmall} @@ -248,7 +248,7 @@ export const V3HoldingPage = () => { onClick={() => pushModal({ modalName: ModalNames.V3ManagePrograms, - data: holding, + data: { holding }, }) } > @@ -272,7 +272,7 @@ export const V3HoldingPage = () => { onClick={() => pushModal({ modalName: ModalNames.V3Withdraw, - data: holding, + data: { holding }, }) } disabled={isDisabled} diff --git a/src/elements/earn/portfolio/v3/holdings/V3HoldingsItemUnstaked.tsx b/src/elements/earn/portfolio/v3/holdings/V3HoldingsItemUnstaked.tsx index 56f50e22..c17e164d 100644 --- a/src/elements/earn/portfolio/v3/holdings/V3HoldingsItemUnstaked.tsx +++ b/src/elements/earn/portfolio/v3/holdings/V3HoldingsItemUnstaked.tsx @@ -112,7 +112,7 @@ export const V3HoldingsItemUnstaked = ({ holding }: { holding: Holding }) => { onClick={() => pushModal({ modalName: ModalNames.V3Withdraw, - data: holding, + data: { holding }, }) } > diff --git a/src/elements/earn/portfolio/v3/holdings/V3HoldingsItemWithdraw.tsx b/src/elements/earn/portfolio/v3/holdings/V3HoldingsItemWithdraw.tsx index 5aa3c7b1..df1d2944 100644 --- a/src/elements/earn/portfolio/v3/holdings/V3HoldingsItemWithdraw.tsx +++ b/src/elements/earn/portfolio/v3/holdings/V3HoldingsItemWithdraw.tsx @@ -25,7 +25,7 @@ export const V3HoldingsItemWithdraw = ({ holding }: { holding: Holding }) => { onClick={() => pushModal({ modalName: ModalNames.V3Withdraw, - data: holding, + data: { holding }, }) } >