From 8819a66e67a09e10a043c9b548b097ffd2c320a5 Mon Sep 17 00:00:00 2001 From: Jamie Hewitt Date: Wed, 11 May 2022 15:29:07 +0300 Subject: [PATCH] Remove risks warning (#1420) * Removing risks warning from add liquidity tab * Removing risks warning from add trade tab * Removing isWarningAccepted state variable --- content/price.json | 6 ++-- .../Asset/AssetActions/Pool/Add/index.tsx | 33 ++++--------------- .../Asset/AssetActions/Trade/FormTrade.tsx | 32 +++++------------- 3 files changed, 16 insertions(+), 55 deletions(-) diff --git a/content/price.json b/content/price.json index cfb269533..6c5fcfa49 100644 --- a/content/price.json +++ b/content/price.json @@ -54,8 +54,7 @@ "titleIn": "You will receive", "titleOut": "Pool conversion" }, - "action": "Supply", - "warning": "Use at your own risk. Please familiarize yourself [with the risks](https://blog.oceanprotocol.com/on-staking-on-data-in-ocean-market-3d8e09eb0a13) and the [Terms of Use](/terms)." + "action": "Supply" }, "remove": { "title": "Remove Liquidity", @@ -68,7 +67,6 @@ } }, "trade": { - "action": "Swap", - "warning": "Use at your own risk. Please familiarize yourself [with the risks](https://blog.oceanprotocol.com/on-staking-on-data-in-ocean-market-3d8e09eb0a13) and the [Terms of Use](/terms)." + "action": "Swap" } } diff --git a/src/components/Asset/AssetActions/Pool/Add/index.tsx b/src/components/Asset/AssetActions/Pool/Add/index.tsx index 5bbea309c..2be2f2b8e 100644 --- a/src/components/Asset/AssetActions/Pool/Add/index.tsx +++ b/src/components/Asset/AssetActions/Pool/Add/index.tsx @@ -40,7 +40,6 @@ export default function Add({ const [amountMax, setAmountMax] = useState() const [newPoolTokens, setNewPoolTokens] = useState('0') const [newPoolShare, setNewPoolShare] = useState('0') - const [isWarningAccepted, setIsWarningAccepted] = useState(false) // Live validation rules // https://github.com/jquense/yup#number @@ -143,37 +142,17 @@ export default function Add({ {({ isSubmitting, setSubmitting, submitForm, values, isValid }) => ( <>
- {isWarningAccepted ? ( - - ) : ( - content.pool.add.warning && ( - setIsWarningAccepted(true) - }} - /> - ) - )} +
('OCEAN') const [maximumBaseToken, setMaximumBaseToken] = useState('0') const [maximumDt, setMaximumDt] = useState('0') - const [isWarningAccepted, setIsWarningAccepted] = useState(false) const validationSchema: Yup.SchemaOf = Yup.object() .shape({ @@ -185,32 +184,17 @@ export default function FormTrade({ > {({ isSubmitting, setSubmitting, submitForm, values, isValid }) => ( <> - {isWarningAccepted ? ( - - ) : ( -
- setIsWarningAccepted(true) - }} - /> -
- )} +