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

Updated the query to return all relevant transactions #9719

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

HarshSawarkar
Copy link

Description:

Modified the query to return all relevant transaction
Related issue(s):

Fixes #9606

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@HarshSawarkar HarshSawarkar requested a review from a team as a code owner November 10, 2024 17:20
hedera-mirror-rest/transactions.js Outdated Show resolved Hide resolved
@@ -344,7 +345,8 @@ const getTransferDistinctTimestampsQuery = (

// the condition to exclude synthetic transactions attached to a user submitted transaction
const transactionByPayerExcludeSyntheticCondition = `${Transaction.getFullName(Transaction.NONCE)} = 0 or
${Transaction.getFullName(Transaction.PARENT_CONSENSUS_TIMESTAMP)} is not null`;
${Transaction.getFullName(Transaction.PARENT_CONSENSUS_TIMESTAMP)} is not null
or ${Transaction.getFullName(Transaction.TYPE)} in (${typesToInclude.map((type) => `'${type}'`).join(', ')})`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once other comments are addressed, .map can be removed. Also, we should only add condition if array is not empty.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should update the hedera-mirror-rest/__tests__/specs/transactions/account-id.json spec test to include these types of transactions.

@@ -41,6 +41,10 @@ hedera:
username: metrics
uriPath: "/swagger"
ipMetrics: false
transactions:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be the protoId of these types. See TransactionType.java.

Copy link
Contributor

@jnels124 jnels124 Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, should move this config to be under the query config and change typesToInclude to precedingTransactionTypes and add config prop to configuration.md

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 this pull request may close these issues.

Transactions API Should Return All Relevant Transactions
2 participants