Skip to content

Commit

Permalink
feat: add wallet changed during execution error
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed May 8, 2024
1 parent e1a423f commit e2409bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/widget/src/hooks/useProcessMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ export function getProcessMessage(
title = t(`error.title.transactionFailed`);
message = t(`error.message.transactionFailed`);
break;
case LiFiErrorCode.WalletChangedDuringExecution:
title = t(`error.title.walletMismatch`);
message = t(`error.message.walletChangedDuringExecution`);
break;
case LiFiErrorCode.TransactionUnderpriced:
title = t(`error.title.transactionUnderpriced`);
message = getDefaultErrorMessage();
Expand Down
6 changes: 4 additions & 2 deletions packages/widget/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@
"transactionCanceled": "Transaction was canceled.",
"transactionFailed": "Please check the block explorer for more information.",
"transactionNotSent": "Transaction was not sent.",
"unknown": "Please try again or contact support."
"unknown": "Please try again or contact support.",
"walletChangedDuringExecution": "The wallet address that requested the quote does not match the wallet address attempting to sign the transaction. Please ensure the same wallet address is used throughout the entire transaction execution."
},
"title": {
"allowanceRequired": "Insufficient allowance",
Expand All @@ -155,7 +156,8 @@
"walletAddressInvalid": "Wallet address or domain name is invalid",
"walletAddressInvalid_chain": "Wallet address or domain name is invalid for selected destination chain {{chainName}}",
"walletAddressRequired": "Wallet address is required.",
"walletChainTypeInvalid": "Wallet address doesn't match the selected destination chain {{chainName}}"
"walletChainTypeInvalid": "Wallet address doesn't match the selected destination chain {{chainName}}",
"walletMismatch": "Wallet address mismatch"
}
},
"tooltip": {
Expand Down

0 comments on commit e2409bf

Please sign in to comment.