Skip to content

Commit

Permalink
fix: add slippage tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Jul 22, 2024
1 parent fe7184b commit 9624fd1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions packages/widget/src/components/TransactionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,11 @@ export const TransactionDetails: React.FC<TransactionDetailsProps> = ({
<>
<Box display="flex" justifyContent="space-between" mb={0.5}>
<Typography variant="body2">{t('main.maxSlippage')}</Typography>
<Typography variant="body2">
{route.steps[0].action.slippage * 100}%
</Typography>
<Tooltip title={t('tooltip.slippage')} sx={{ cursor: 'help' }}>
<Typography variant="body2">
{route.steps[0].action.slippage * 100}%
</Typography>
</Tooltip>
</Box>
<Box display="flex" justifyContent="space-between">
<Typography variant="body2">{t('main.minReceived')}</Typography>
Expand Down
5 changes: 3 additions & 2 deletions packages/widget/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
}
},
"tooltip": {
"deselectAll": "Deselect all",
"estimatedTime": "Estimated execution time in minutes.",
"minReceived": "The estimated minimum amount may change until the swapping/bridging transaction is signed. For 2-step transfers, this applies until the second step transaction is signed.",
"notFound": {
Expand All @@ -176,7 +177,7 @@
"progressToNextUpdate": "Quotes will update in {{value}} seconds. <0/> Click here to update now.",
"selectAll": "Select all",
"settingsModified": "Settings (modified)",
"deselectAll": "Deselect all"
"slippage": "The maximum percentage difference between the expected price, and the actual price at which a transfer is executed. This value can be changed in settings."
},
"main": {
"allTokens": "All tokens",
Expand Down Expand Up @@ -277,7 +278,7 @@
"title": "Gas price"
},
"routePriority": "Route priority",
"slippage": "Slippage",
"slippage": "Max. slippage",
"custom": "Custom",
"resetSettings": "You're using custom settings that can affect the number or sorting of available routes."
},
Expand Down

0 comments on commit 9624fd1

Please sign in to comment.