From f8bac404126d3cd9859869fee83c93a6919ec05f Mon Sep 17 00:00:00 2001 From: saml33 Date: Thu, 18 Jan 2024 23:58:18 +1100 Subject: [PATCH] add uninsured warning notification to trade --- components/DepositForm.tsx | 20 ++--------- components/shared/Tooltip.tsx | 6 +++- components/shared/UninsuredNotification.tsx | 35 ++++++++++++++++++++ components/swap/SwapReviewRouteInfo.tsx | 20 ++--------- components/trade/AdvancedTradeForm.tsx | 35 ++++++++++++++++++-- components/trade/SpotMarketOrderSwapForm.tsx | 12 +++++++ public/locales/en/account.json | 3 +- public/locales/es/account.json | 3 +- public/locales/ru/account.json | 3 +- public/locales/zh/account.json | 3 +- public/locales/zh_tw/account.json | 3 +- 11 files changed, 99 insertions(+), 44 deletions(-) create mode 100644 components/shared/UninsuredNotification.tsx diff --git a/components/DepositForm.tsx b/components/DepositForm.tsx index 9949e0ae..2bb8384a 100644 --- a/components/DepositForm.tsx +++ b/components/DepositForm.tsx @@ -39,8 +39,8 @@ import SecondaryConnectButton from './shared/SecondaryConnectButton' import useTokenPositionsFull from 'hooks/useAccountPositionsFull' import AccountSlotsFullNotification from './shared/AccountSlotsFullNotification' import { handleInputChange } from 'utils/account' -import InlineNotification from './shared/InlineNotification' import { Bank, Group } from '@blockworks-foundation/mango-v4' +import UninsuredNotification from './shared/UninsuredNotification' interface DepositFormProps { onSuccess: () => void @@ -313,23 +313,7 @@ function DepositForm({ onSuccess, token }: DepositFormProps) { ) : null} - {!isInsured ? ( - - {t('account:warning-uninsured', { token: bank?.name })}{' '} - - {t('learn-more')} - - - } - /> - ) : null} + {!isInsured ? : null} {connected ? (