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

docs: document hidden tx summary methods #3408

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

Conversation

Dhaiwat10
Copy link
Member

@Dhaiwat10 Dhaiwat10 commented Nov 20, 2024

Summary

This PR adds some hidden tx summary methods to the API docs.

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

@Dhaiwat10 Dhaiwat10 self-assigned this Nov 20, 2024
Copy link

vercel bot commented Nov 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 10:58am
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 10:58am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
ts-docs-api ⬜️ Ignored (Inspect) Nov 20, 2024 10:58am

@Dhaiwat10 Dhaiwat10 changed the title Dp/tx summary docs docs: document hidden tx summary methods Nov 20, 2024
@github-actions github-actions bot added the docs Requests pertinent to documentation label Nov 20, 2024
Copy link

codspeed-hq bot commented Nov 20, 2024

CodSpeed Performance Report

Merging #3408 will not alter performance

Comparing dp/tx-summary-docs (7ecb6b4) with master (6ab3e6b)

Summary

✅ 18 untouched benchmarks

Copy link
Contributor

@danielbate danielbate left a comment

Choose a reason for hiding this comment

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

Nits

/** @hidden */
/**
* Gets transaction summaries for a given owner/address.
* @param params - The filters to apply to the query.
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing return type here

@@ -42,15 +42,24 @@ import type {
AbiMap,
} from './types';

/** @hidden */
/**
* Extracts a specific type of receipts from a list of receipts.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Extracts a specific type of receipts from a list of receipts.
* Extracts a specific type of receipt from a list of receipts.
*

export function getReceiptsByType<T = TransactionResultReceipt>(
receipts: TransactionResultReceipt[],
type: ReceiptType
) {
return (receipts ?? []).filter((r) => r.type === type) as T[];
}

/** @hidden */
/**
* Returns the transaction type's name based on the transaction type enum value.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Returns the transaction type's name based on the transaction type enum value.
* Returns the transaction type's name based on the transaction type enum value.
*

@@ -137,7 +137,10 @@ export interface GetTransactionsSummariesReturns {
pageInfo: PageInfo;
}

/** @hidden */
/**
* Gets transaction summaries for a given owner/address.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Gets transaction summaries for a given owner/address.
* Gets transaction summaries for a given owner/address.
*

@@ -356,7 +372,14 @@ export function getContractCallOperations({
});
}

/** @hidden */
/**
* Extracts a transfer operation from a transaction receipt, determining the addresses and types
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Extracts a transfer operation from a transaction receipt, determining the addresses and types
* Extracts a transfer operation from a transaction receipt, determining the addresses and types
*

Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
64.2%(+0%) 69.71%(+0%) 72.99%(+0%) 64.64%(+0%)
Changed Files:

Coverage values did not change👌.

Copy link
Contributor

@Torres-ssf Torres-ssf left a comment

Choose a reason for hiding this comment

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

Aside @danielbate suggestions, this looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Requests pertinent to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document hidden transaction summary methods
3 participants