Skip to content

Commit

Permalink
tx: hardhat E2E error msg fix
Browse files Browse the repository at this point in the history
  • Loading branch information
holgerd77 committed Oct 25, 2021
1 parent e1ec6a0 commit 14cdd66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 1 addition & 5 deletions packages/client/test/rpc/eth/sendRawTransaction.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@ tape(`${method}: call with invalid tx (wrong chain ID)`, async (t) => {
'0x02f9010a82066a8001018402625a0094cccccccccccccccccccccccccccccccccccccccc830186a0b8441a8451e600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f85bf859940000000000000000000000000000000000000101f842a00000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000060a701a0afb6e247b1c490e284053c87ab5f6b59e219d51f743f7a4d83e400782bc7e4b9a0479a268e0e0acd4de3f1e28e4fac2a6b32a4195e8dfa9d19147abe8807aa6f64'
const req = params(method, [txData])

const expectRes = checkError(
t,
PARSE_ERROR,
'serialized tx data could not be parsed (The chain ID does not match the chain ID of Common)'
)
const expectRes = checkError(t, PARSE_ERROR, 'serialized tx data could not be parsed')
await baseRequest(t, server, req, 200, expectRes)
})

Expand Down
3 changes: 2 additions & 1 deletion packages/tx/src/eip2930Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,8 @@ export default class AccessListEIP2930Transaction extends BaseTransaction<Access
*/
public errorStr() {
let errorStr = this._getSharedErrorPostfix()
errorStr += ` gasPrice=${this.gasPrice} accessList=${this.accessList.length} (size)`
// Keep ? for this.accessList since this otherwise causes Hardhat E2E tests to fail
errorStr += ` gasPrice=${this.gasPrice} accessList=${this.accessList?.length} (size)`
return errorStr
}

Expand Down

1 comment on commit 14cdd66

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 14cdd66 Previous: 125e210 Ratio
Block 9422912 9832 ops/sec (±16.04%) 22437 ops/sec (±2.31%) 2.28

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.