Skip to content

Commit 66e3e17

Browse files
committed
Fix contract error matching
1 parent 291898c commit 66e3e17

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ui/components/pages/swap/swap.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export function Swap() {
175175

176176
// errors from nested invokes
177177
let match = errMessage.match(
178-
/error\s+while\s+executing\s+account-script:\s*\w+\(code\s*=\s*(?:.+),\s*error\s*=\s*([\s\S]+)\s*,\s*log\s*=/im
178+
/Error while executing dApp: \w+\(code\s*=\s*(?:.+),\s*error\s*=\s*([\s\S]+)\s*,\s*log\s*=/im
179179
);
180180

181181
if (match) {
@@ -206,9 +206,7 @@ export function Swap() {
206206
}
207207

208208
// errors from contract itself
209-
match = errMessage.match(
210-
/error\s+while\s+executing\s+account-script:\s*([\s\S]+)/im
211-
);
209+
match = errMessage.match(/Error while executing dApp: ([\s\S]+)/im);
212210

213211
if (match) {
214212
const [, msg] = match;

0 commit comments

Comments
 (0)