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

Transaction's search API returns a count>0 but rows is empty #3569

Closed
mudlee opened this issue Mar 4, 2020 · 4 comments
Closed

Transaction's search API returns a count>0 but rows is empty #3569

mudlee opened this issue Mar 4, 2020 · 4 comments

Comments

@mudlee
Copy link

mudlee commented Mar 4, 2020

We use the Transaction's search API like this:

const txData: Database.ITransactionsPaginated = await this.transactions.search({
  senderPublicKey,
  vendorField
});

The problem, that the result's count shows 1 for me for a query I created, but the rows field is empty.

Expected Behavior

I expect to get back a result like:

{
  "rows": [SOMETHING HERE],
  "count": 1,
  "countIsEstimate": true
}

Current Behavior

But I get back:

{
  "rows": [],
  "count": 1,
  "countIsEstimate": true
}

Possible Solution

Steps to Reproduce (for bugs)

Context

We are a bridgechain developing a layer2 solution, where we use this API

Your Environment

  • Version used: 2.6.10
@ghost
Copy link

ghost commented Mar 4, 2020

Thanks for opening this issue! A maintainer will review this in the next few days and explicitly select labels so you know what's going on.

If no reviewer appears after a week, a reminder will be sent out.

@alessiodf
Copy link
Contributor

Set CORE_API_NO_ESTIMATED_TOTAL_COUNT to true in your .env file.

@mudlee
Copy link
Author

mudlee commented Mar 7, 2020

makes sense! thx for the solution.

@mudlee mudlee closed this as completed Mar 7, 2020
@ghost
Copy link

ghost commented Mar 7, 2020

This issue has been closed. If you wish to re-open it please provide additional information.

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

No branches or pull requests

2 participants