Skip to content

Commit

Permalink
Fix undefined event params (#1302)
Browse files Browse the repository at this point in the history
* fix undefined params

* remove comment

* use warning

---------

Co-authored-by: Alistair Singh <[email protected]>
  • Loading branch information
claravanstaden and alistair-singh authored Oct 8, 2024
1 parent bd3961d commit 51ee92a
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 21 deletions.
4 changes: 2 additions & 2 deletions web/packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@snowbridge/api",
"version": "0.1.22",
"version": "0.1.23",
"description": "Snowbridge API client",
"license": "Apache-2.0",
"repository": {
Expand Down Expand Up @@ -34,7 +34,7 @@
"@polkadot/util-crypto": "^12.6.2",
"@snowbridge/contract-types": "workspace:*",
"@typechain/ethers-v6": "^0.5.1",
"ethers": "^6.13.1",
"ethers": "^6.13.3",
"rxjs": "^7.8.1"
}
}
5 changes: 5 additions & 0 deletions web/packages/api/src/subscan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ export const fetchEvents = async <T>(
}

for (const { event_index, params } of paramsResponse.json.data) {
if (params === undefined) {
console.warn("Event does not have any params", event_index)
continue;
}

const event = map.get(event_index)
const transform = await filterMap(event, params)
if (transform === null) {
Expand Down
4 changes: 2 additions & 2 deletions web/packages/contract-types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@snowbridge/contract-types",
"version": "0.1.22",
"version": "0.1.23",
"description": "Snowbridge contract type bindings",
"license": "Apache-2.0",
"repository": {
Expand All @@ -22,6 +22,6 @@
"typescript": "^5.4.5"
},
"dependencies": {
"ethers": "^6.13.1"
"ethers": "^6.13.3"
}
}
2 changes: 1 addition & 1 deletion web/packages/contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@snowbridge/contracts",
"version": "0.1.22",
"version": "0.1.23",
"description": "Snowbridge contract source and abi.",
"license": "Apache-2.0",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion web/packages/operations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"axios": "^1.6.8",
"bitfield": "^4.2.0",
"dotenv": "^16.4.5",
"ethers": "^6.13.1",
"ethers": "^6.13.3",
"fastify": "^4.27.0",
"keccak": "^3.0.4",
"lodash": "^4.17.21",
Expand Down
28 changes: 13 additions & 15 deletions web/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 51ee92a

Please sign in to comment.