From 5ec95663b465be212387fcb122734188e34f96c4 Mon Sep 17 00:00:00 2001 From: gomes <17035424+gomesalexandre@users.noreply.github.com> Date: Wed, 8 Jan 2025 15:36:28 +0400 Subject: [PATCH] fix: more derpiness --- src/assets/translations/en/main.json | 2 +- .../ApprovalStep/components/ApprovalContent.tsx | 13 +++++++++++-- .../ApprovalStep/hooks/usePermit2Content.tsx | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/assets/translations/en/main.json b/src/assets/translations/en/main.json index 8e61fc1183a..523375a388f 100644 --- a/src/assets/translations/en/main.json +++ b/src/assets/translations/en/main.json @@ -925,11 +925,11 @@ }, "permit2Allowance": { "title": "Permit2 contract allowance", - "description": "Grant the smart contract permission to use %{symbol} on your behalf.", "tooltip": "This trade uses Permit2, which requires a one-time approval to grant unlimited allowance to the Permit2 contract. After this initial setup, you can authorize trades on any Permit2-supported protocol by signing gas-free messages that grant temporary 5-minute allowances." }, "permit2Eip712": { "title": "Permit token transfer", + "description": "Grant the smart contract permission to use %{symbol} on your behalf.", "error": "A problem occurred signing Permit2 message", "signMessage": "Sign message", "tooltip": "This will grant %{swapperName} a 5-minute allowance to complete the trade on your behalf." diff --git a/src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/ApprovalStep/components/ApprovalContent.tsx b/src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/ApprovalStep/components/ApprovalContent.tsx index 6e41a03db5c..533e514a790 100644 --- a/src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/ApprovalStep/components/ApprovalContent.tsx +++ b/src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/ApprovalStep/components/ApprovalContent.tsx @@ -1,4 +1,13 @@ -import { Box, Button, Card, CircularProgress, Icon, Tooltip, VStack } from '@chakra-ui/react' +import { + Box, + Button, + Card, + CircularProgress, + Icon, + Text as CText, + Tooltip, + VStack, +} from '@chakra-ui/react' import type { InterpolationOptions } from 'node-polyglot' import { FaInfoCircle } from 'react-icons/fa' import { useTranslate } from 'react-polyglot' @@ -54,7 +63,7 @@ export const ApprovalContent = ({ {subHeadingTranslation && ( - + {translate(subHeadingTranslation)} )} diff --git a/src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/ApprovalStep/hooks/usePermit2Content.tsx b/src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/ApprovalStep/hooks/usePermit2Content.tsx index a5e5c6b6a71..338cb59346e 100644 --- a/src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/ApprovalStep/hooks/usePermit2Content.tsx +++ b/src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/ApprovalStep/hooks/usePermit2Content.tsx @@ -57,7 +57,7 @@ export const usePermit2Content = ({ }, [hopExecutionState, permit2.state, isTradeQuotesLoading]) const subHeadingTranslation: [string, InterpolationOptions] = useMemo(() => { - return ['trade.permit2Allowance.description', { symbol: tradeQuoteStep.sellAsset.symbol }] + return ['trade.permit2Eip712.description', { symbol: tradeQuoteStep.sellAsset.symbol }] }, [tradeQuoteStep]) const tooltipTranslation: [string, InterpolationOptions] = useMemo(() => {