Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add index field to IndexedTx #1361

Closed
webmaster128 opened this issue Jan 1, 2023 · 0 comments · Fixed by #1377
Closed

Add index field to IndexedTx #1361

webmaster128 opened this issue Jan 1, 2023 · 0 comments · Fixed by #1377
Milestone

Comments

@webmaster128
Copy link
Member

webmaster128 commented Jan 1, 2023

Index is the position within a block. This is lost here:

  private async txsQuery(query: string): Promise<readonly IndexedTx[]> {
    const results = await this.forceGetTmClient().txSearchAll({ query: query });
    return results.txs.map((tx) => {
      // tx.index should be used too
      return {
        height: tx.height,
        hash: toHex(tx.hash).toUpperCase(),
        code: tx.result.code,
        events: tx.result.events.map(fromTendermint34Event),
        rawLog: tx.result.log || "",
        tx: tx.tx,
        gasUsed: tx.result.gasUsed,
        gasWanted: tx.result.gasWanted,
      };
    });
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant