Skip to content

Conversation

@iamacook
Copy link
Contributor

Summary

This resolves #1206 by adding the trusted query param. from the history endpoint to the incoming-transfers one. The associated logic has been moved fromTransactionsHistoryMapper['mapTransfers'] into a new TransferMapper['mapTransfers'] method that accepts an onlyTrusted argument.

Changes

  • A trusted query param to TransactionsController['getIncomingTransfers']
  • Move trust-related filtering from TransactionsHistoryMapper['mapTransfers'] to TransferMapper['mapTransfers']
  • Migrate all usage of TransferMapper['mapTransfer'] to TransferMapper['mapTransfers']
  • Add/updated associated tests.

@iamacook iamacook self-assigned this Feb 27, 2024
@iamacook iamacook requested a review from a team as a code owner February 27, 2024 12:08
@coveralls
Copy link

coveralls commented Feb 27, 2024

Pull Request Test Coverage Report for Build 8092707052

Details

  • 17 of 17 (100.0%) changed or added relevant lines in 3 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 93.639%

Files with Coverage Reduction New Missed Lines %
src/routes/transactions/entities/tests/human-description.builder.ts 3 60.0%
Totals Coverage Status
Change from base Build 8081216656: -0.03%
Covered Lines: 6159
Relevant Lines: 6363

💛 - Coveralls

@fmrsabino fmrsabino added the in review Someone is reviewing this Pull Request label Feb 28, 2024
@fmrsabino fmrsabino removed the in review Someone is reviewing this Pull Request label Feb 28, 2024
@iamacook iamacook requested a review from fmrsabino February 29, 2024 07:54
Copy link
Contributor

@fmrsabino fmrsabino left a comment

Choose a reason for hiding this comment

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

🚀

@iamacook iamacook merged commit 3cbf639 into main Feb 29, 2024
@iamacook iamacook deleted the trusted-incoming-transfers branch February 29, 2024 09:32
hectorgomezv pushed a commit that referenced this pull request Feb 29, 2024
This adds a `trusted` query param. to the `incoming-transfers` endpoints, mirroring that of the `history` endpoint. If `true`, it filters ERC-20 transfers that are untrusted.
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.

Add trusted query to incoming-transfers endpoint

4 participants