diff --git a/src/transaction/transaction.spec.ts b/src/transaction/transaction.spec.ts index 32fb8a90..6a7bd4ef 100644 --- a/src/transaction/transaction.spec.ts +++ b/src/transaction/transaction.spec.ts @@ -320,15 +320,10 @@ describe('transaction', () => { ) // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (e: any) { - const regex = /RewardsBase:(\d+)/ - const match = e.traces[0].message.match(regex) - expect(match).toBeDefined() - const rewardsBase = parseInt(match[1], 10) - expect(e.traces[0].message).toEqual( - `transaction ${txn2.txID()}: overspend (account ${ - testAccount.addr - }, data {AccountBaseData:{Status:Offline MicroAlgos:{Raw:9998000} RewardsBase:${rewardsBase} RewardedMicroAlgos:{Raw:0} AuthAddr:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ TotalAppSchema:{_struct:{} NumUint:0 NumByteSlice:0} TotalExtraAppPages:0 TotalAppParams:0 TotalAppLocalStates:0 TotalAssetParams:0 TotalAssets:0 TotalBoxes:0 TotalBoxBytes:0} VotingData:{VoteID:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] SelectionID:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] StateProofID:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] VoteFirstValid:0 VoteLastValid:0 VoteKeyDilution:0}}, tried to spend {9999999999999})`, + const messageRegex = new RegExp( + `transaction ${txn2.txID()}: overspend \\(account ${testAccount.addr}, data \\{.*\\}, tried to spend \\{9999999999999\\}\\)`, ) + expect(e.traces[0].message).toMatch(messageRegex) } }) })