From 22dff31a0f091e5762cdc8db7831b22e1026ef63 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Wed, 1 Nov 2023 16:06:44 +0530 Subject: [PATCH] update msg in modal --- libs/remix-ui/run-tab/src/lib/actions/deploy.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/remix-ui/run-tab/src/lib/actions/deploy.ts b/libs/remix-ui/run-tab/src/lib/actions/deploy.ts index 83a75a3085..0e368ec008 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/deploy.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/deploy.ts @@ -119,8 +119,10 @@ const getConfirmationCb = (plugin: RunTab, dispatch: React.Dispatch, confir export const continueHandler = (dispatch: React.Dispatch, gasEstimationPrompt: (msg: string) => JSX.Element, error, continueTxExecution, cancelCb) => { if (error) { - const msg = typeof error !== 'string' ? error.message : error - + let msg = typeof error !== 'string' ? error.message : error + + if (msg.includes('invalid opcode')) msg += '/n OR the EVM version used by the selected environment is not compatible with the compiler EVM version.' + dispatch(displayNotification('Gas estimation failed', gasEstimationPrompt(msg), 'Send Transaction', 'Cancel Transaction', () => { continueTxExecution() }, () => {