Skip to content

Commit

Permalink
fix: more derpiness
Browse files Browse the repository at this point in the history
  • Loading branch information
gomesalexandre committed Jan 8, 2025
1 parent 1fc3905 commit 5ec9566
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/assets/translations/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -54,7 +63,7 @@ export const ApprovalContent = ({
{subHeadingTranslation && (
<Row px={2}>
<Row.Label textAlign='left' display='flex'>
<Text color='text.subtle' translation={subHeadingTranslation} />
<CText color='text.subtle'>{translate(subHeadingTranslation)}</CText>
</Row.Label>
</Row>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit 5ec9566

Please sign in to comment.