Skip to content

Commit

Permalink
fix TypeError: Cannot convert null to a BigInt during data mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
eldargab committed Jul 20, 2023
1 parent f5874bc commit aa8822f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@subsquid/evm-processor",
"comment": "fix `TypeError: Cannot convert null to a BigInt` during data mapping",
"type": "patch"
}
],
"packageName": "@subsquid/evm-processor"
}
2 changes: 2 additions & 0 deletions evm/evm-processor/src/ds-archive/mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ function mapBlockHeader(src: gw.Block): BlockHeader<AllFields> {

let key: keyof gw.Block
for (key in src) {
if (src[key] == null) continue
switch(key) {
case 'number':
header.height = src.number
Expand Down Expand Up @@ -135,6 +136,7 @@ function mapTransaction(block: BlockHeader<AllFields>, src: gw.Transaction): Tra

let key: keyof gw.Transaction
for (key in src) {
if (src[key] == null) continue
switch(key) {
case 'gas':
case 'gasPrice':
Expand Down

0 comments on commit aa8822f

Please sign in to comment.