From 66e3e17364a12aa1bd1826abd7b86ce728210c68 Mon Sep 17 00:00:00 2001 From: Sergey Slipchenko Date: Tue, 14 Mar 2023 18:25:26 +0400 Subject: [PATCH] Fix contract error matching --- src/ui/components/pages/swap/swap.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ui/components/pages/swap/swap.tsx b/src/ui/components/pages/swap/swap.tsx index 9d51f4ffb..f73d649dd 100644 --- a/src/ui/components/pages/swap/swap.tsx +++ b/src/ui/components/pages/swap/swap.tsx @@ -175,7 +175,7 @@ export function Swap() { // errors from nested invokes let match = errMessage.match( - /error\s+while\s+executing\s+account-script:\s*\w+\(code\s*=\s*(?:.+),\s*error\s*=\s*([\s\S]+)\s*,\s*log\s*=/im + /Error while executing dApp: \w+\(code\s*=\s*(?:.+),\s*error\s*=\s*([\s\S]+)\s*,\s*log\s*=/im ); if (match) { @@ -206,9 +206,7 @@ export function Swap() { } // errors from contract itself - match = errMessage.match( - /error\s+while\s+executing\s+account-script:\s*([\s\S]+)/im - ); + match = errMessage.match(/Error while executing dApp: ([\s\S]+)/im); if (match) { const [, msg] = match;