Skip to content

Commit

Permalink
update tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
namgold committed Aug 14, 2023
1 parent 1814b7c commit 884b6ed
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 24 deletions.
13 changes: 8 additions & 5 deletions src/components/SwapForm/AddMEVProtectionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,20 @@ export default function AddMEVProtectionModal({ isOpen, onClose }: { isOpen: boo
<Row gap="12px">
<Text fontSize={12} lineHeight="16px">
<Trans>
We suggest using the{' '}
<ExternalLink href="https://docs.kyberswap.com/getting-started/foundational-topics/decentralized-finance/maximal-extractable-value-mev">
MEV
</ExternalLink>{' '}
Protection safeguards you from front-running attacks on Ethereum. We suggest you employing the{' '}
<ExternalLink href="https://docs.kyberswap.com/getting-started/foundational-topics/decentralized-technologies/rpc">
RPC endpoint
</ExternalLink>{' '}
of trusted third-parties like{' '}
of reliable third-parties such as{' '}
<ExternalLink href="https://docs.flashbots.net/flashbots-protect/overview">Flashbots</ExternalLink> or{' '}
<ExternalLink href="https://mevblocker.io/#faq">MEVBlocker</ExternalLink> to protect you from MEV Bots.{' '}
<ExternalLink href="https://mevblocker.io/#faq">MEVBlocker</ExternalLink>.
<br />
<br />
Please note that adding a RPC endpoint automatically is only supported via the MetaMask wallet. If you
wish to add the RPC endpoint to your wallet manually, refer to this{' '}
Note that adding the RPC endpoint automatically is only available via the MetaMask wallet. If you would
like to add the RPC endpoint to your wallet manually, please refer to this{' '}
<ExternalLink href="https://docs.kyberswap.com/getting-started/quickstart/faq#how-to-change-rpc-in-metamask">
guide
</ExternalLink>
Expand Down
27 changes: 8 additions & 19 deletions src/components/SwapForm/SlippageSettingGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,14 @@ export default function SlippageSettingGroup({

const rightButton =
chainId === ChainId.MAINNET && walletEVM.isConnected ? (
<MouseoverTooltip
text={
<Trans>
MEV Protection will protect you from front-running and sandwich attacks on Ethereum. Learn more{' '}
<ExternalLink href="https://docs.kyberswap.com/getting-started/foundational-topics/decentralized-finance/maximal-extractable-value-mev">
here ↗
</ExternalLink>
</Trans>
}
>
<PriceAlertButton onClick={addMevProtectionHandler}>
<Shield size={14} color={theme.subText} />
{upToXXSmall ? null : (
<Text color={theme.subText} style={{ whiteSpace: 'nowrap' }}>
<Trans>Add MEV Protection</Trans>
</Text>
)}
</PriceAlertButton>
</MouseoverTooltip>
<PriceAlertButton onClick={addMevProtectionHandler}>
<Shield size={14} color={theme.subText} />
{upToXXSmall ? null : (
<Text color={theme.subText} style={{ whiteSpace: 'nowrap' }}>
<Trans>Add MEV Protection</Trans>
</Text>
)}
</PriceAlertButton>
) : null

return (
Expand Down

0 comments on commit 884b6ed

Please sign in to comment.