From d0935ea057ad15e64852a525e25ba5b58c698427 Mon Sep 17 00:00:00 2001 From: Doron Zavelevsky Date: Tue, 7 Nov 2023 16:55:59 +0000 Subject: [PATCH 1/2] disable depositing to BNT --- src/services/observables/apiData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/observables/apiData.ts b/src/services/observables/apiData.ts index 8f680448..81e73cb9 100644 --- a/src/services/observables/apiData.ts +++ b/src/services/observables/apiData.ts @@ -86,7 +86,7 @@ export const apiPoolsV3$ = combineLatest([apiBntV3$]).pipe( tkn: '0', }, tradingEnabled: true, - depositingEnabled: true, + depositingEnabled: false, }; return [...(await BancorApi.v3.getPools()), bntPool]; }), From d91dd7a2723c9c0e843f1e14957dafc1caed62e4 Mon Sep 17 00:00:00 2001 From: Doron Zavelevsky Date: Tue, 7 Nov 2023 17:14:00 +0000 Subject: [PATCH 2/2] message text change --- .../earn/pools/poolsTable/EarnTableV2.tsx | 3 ++- .../poolsTable/PoolsTableCellActions.tsx | 3 ++- .../poolsTable/v3/DepositDisabledModal.tsx | 20 ++++++------------- .../pools/poolsTable/v3/DepositV3Modal.tsx | 8 +++++++- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/elements/earn/pools/poolsTable/EarnTableV2.tsx b/src/elements/earn/pools/poolsTable/EarnTableV2.tsx index b0bda488..4928a2b8 100644 --- a/src/elements/earn/pools/poolsTable/EarnTableV2.tsx +++ b/src/elements/earn/pools/poolsTable/EarnTableV2.tsx @@ -105,7 +105,8 @@ export const EarnTableV2 = ({ id: 'actions', Header: '', accessor: 'pool_dlt_id', - Cell: (cellData) => PoolsTableCellActions(cellData.value), + Cell: (cellData) => + PoolsTableCellActions(cellData.value, cellData.row.original.name), width: 50, minWidth: 50, disableSortBy: true, diff --git a/src/elements/earn/pools/poolsTable/PoolsTableCellActions.tsx b/src/elements/earn/pools/poolsTable/PoolsTableCellActions.tsx index bcda0766..2f3915f5 100644 --- a/src/elements/earn/pools/poolsTable/PoolsTableCellActions.tsx +++ b/src/elements/earn/pools/poolsTable/PoolsTableCellActions.tsx @@ -4,7 +4,7 @@ import { DepositDisabledModal } from 'elements/earn/pools/poolsTable/v3/DepositD import { Navigate } from 'components/navigate/Navigate'; import { BancorURL } from 'router/bancorURL.service'; -export const PoolsTableCellActions = (id: string) => { +export const PoolsTableCellActions = (id: string, symbol: string) => { const enableDeposit = false; const button = (onClick: () => void) => ( @@ -31,6 +31,7 @@ export const PoolsTableCellActions = (id: string) => { button(onclick)} isV3={false} + symbol={symbol} /> ); }; diff --git a/src/elements/earn/pools/poolsTable/v3/DepositDisabledModal.tsx b/src/elements/earn/pools/poolsTable/v3/DepositDisabledModal.tsx index d8e9255d..f41c5f9e 100644 --- a/src/elements/earn/pools/poolsTable/v3/DepositDisabledModal.tsx +++ b/src/elements/earn/pools/poolsTable/v3/DepositDisabledModal.tsx @@ -1,33 +1,25 @@ import { useState } from 'react'; import { ModalV3 } from 'components/modal/ModalV3'; -import { Navigate } from 'components/navigate/Navigate'; interface Props { renderButton: (onClick: () => void) => React.ReactNode; isV3: boolean; + symbol: string; } -const V3Content = ( +const V3Content = ({ symbol }: { symbol: string }) => (
- Deposits are currently disabled in the bancor.network UI. To deposit via - Etherscan at your own risk,{' '} - - follow this guide - - . + Deposits to the {symbol} pool are currently disabled and are not available.
); -const V2Content = ( +const V2Content = () => (
Deposits are currently disabled on all v2 pools.
); -export const DepositDisabledModal = ({ renderButton, isV3 }: Props) => { +export const DepositDisabledModal = ({ renderButton, isV3, symbol }: Props) => { const [isOpen, setIsOpen] = useState(false); const onClose = async () => { @@ -39,7 +31,7 @@ export const DepositDisabledModal = ({ renderButton, isV3 }: Props) => { {renderButton(() => setIsOpen(true))}
- {isV3 ? V3Content : V2Content} + {isV3 ? : }
diff --git a/src/elements/earn/pools/poolsTable/v3/DepositV3Modal.tsx b/src/elements/earn/pools/poolsTable/v3/DepositV3Modal.tsx index 3adcde26..c98218e3 100644 --- a/src/elements/earn/pools/poolsTable/v3/DepositV3Modal.tsx +++ b/src/elements/earn/pools/poolsTable/v3/DepositV3Modal.tsx @@ -224,7 +224,13 @@ export const DepositV3Modal = ({ pool, renderButton }: Props) => { const vaultBalance = toBigNumber(pool.poolDeficit); if (!pool.depositingEnabled) - return ; + return ( + + ); return ( <>