diff --git a/packages/widget/src/i18n/en/translation.json b/packages/widget/src/i18n/en/translation.json index 2ccd3f92a..ce36d73c7 100644 --- a/packages/widget/src/i18n/en/translation.json +++ b/packages/widget/src/i18n/en/translation.json @@ -79,12 +79,14 @@ "transactionUnderpriced": "Transaction is underpriced.", "transactionUnprepared": "Unable to prepare transaction.", "unknown": "Something went wrong.", - "userRejectedSignatureRequest": "Signature required." + "userRejectedSignatureRequest": "Signature required.", + "slippageTooLarge": "Slippage too large." }, "message": { "signatureRequired": "Your signature is required to complete the transaction. {{amount}} {{tokenSymbol}} on {{chainName}} remain in your wallet.", "transactionFailed": "Please check the block explorer for more information.", - "transactionNotSent": "Transaction was not sent, your funds are still in your wallet ({{amount}} {{tokenSymbol}} on {{chainName}})." + "transactionNotSent": "Transaction was not sent, your funds are still in your wallet ({{amount}} {{tokenSymbol}} on {{chainName}}).", + "slippageTooLarge": "The slippage is larger than the defined threshold. Please request a new route to get a fresh quote." } }, "process": { diff --git a/packages/widget/src/pages/SwapPage/utils.ts b/packages/widget/src/pages/SwapPage/utils.ts index 3771af3d6..44121e8e7 100644 --- a/packages/widget/src/pages/SwapPage/utils.ts +++ b/packages/widget/src/pages/SwapPage/utils.ts @@ -89,6 +89,10 @@ export function getProcessMessage( title = t(`swap.error.title.transactionUnprepared`); message = getTransactionNotSentMessage(); break; + case LifiErrorCode.SlippageError: + title = t(`swap.error.title.slippageTooLarge`); + message = t(`swap.error.message.slippageTooLarge`); + break; case MetaMaskProviderErrorCode.userRejectedRequest: title = t(`swap.error.title.userRejectedSignatureRequest`); message = t(`swap.error.message.signatureRequired`, {