Skip to content

Commit 0a55b8b

Browse files
committed
fix: extract revert reason for new lotus
Ref: filecoin-project/lotus#12675
1 parent 75b48ec commit 0a55b8b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

test/UniswapV3Pool.swaps.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,8 @@ describe('UniswapV3Pool swap tests', () => {
513513
try {
514514
await (await tx).wait()
515515
} catch (error) {
516-
// extract reason
517-
const match = /revert reason: Error\(([^)]+)\),/g.exec(error.message) || [null, null]
516+
const match = /\[Error\(([^)]+)\)\]/g.exec(error) || [null, null]
518517
const vmError = `VM Exception while processing transaction: revert ${match[1]}`
519-
520518
expect({
521519
swapError: vmError,
522520
poolBalance0: poolBalance0.toString(),

0 commit comments

Comments
 (0)