Skip to content

[SDK] Invalid types in utils filters #3712

Description

@dnechay

Describe the bug
When using TransactionUtils and passing start/end block, their types are defined as number, but return type for block property is bigint, so they are not compatible. If you do types casting block as unknown as number - then bigint is passed and can't be serialised in subgraph query

To Reproduce
Steps to reproduce the behavior:

  1. Get some tx using TransactionUtils.getTransactions
  2. Use tx.block as startBlock filter in consequent TransactionUtils.getTransactions call
  3. See TS error

Expected behavior
Types are correct for filters and bigint can be used (i.e. block numbers have correct types and serialized correctly before passing to subgraph query)

Screenshots
Image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions