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

Include SwapTransfer when checking whether TransactionInfo['type'] is a transfer #1725

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Jul 4, 2024

Summary

When mapping swap transfers, the type is no longer Transfer but SwapTransfer. This means that any comparisons happening according to what was previously Transfer no longer happen: trust filtering and imitation flagging early returns.

This adds the relative checks for SwapTransfer-typed transfers, as well as adding relative test coverage.

Changes

Note: the following can be assumed as we check the address of the settlement contract:

  • Add early return for imitation flagging
  • Assume trust when filtering transfers
  • Add test coverage accordingly

@iamacook iamacook self-assigned this Jul 4, 2024
@iamacook iamacook requested a review from a team as a code owner July 4, 2024 11:48
@coveralls
Copy link

coveralls commented Jul 4, 2024

Pull Request Test Coverage Report for Build 9793769254

Details

  • 3 of 8 (37.5%) changed or added relevant lines in 3 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.06%) to 48.523%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/routes/transactions/swap-transfer-transaction-info.entity.ts 1 2 50.0%
src/routes/transactions/mappers/transfers/transfer.mapper.ts 1 5 20.0%
Files with Coverage Reduction New Missed Lines %
src/routes/transactions/mappers/transfers/transfer.mapper.ts 2 27.03%
Totals Coverage Status
Change from base Build 9793671186: -0.06%
Covered Lines: 4217
Relevant Lines: 6996

💛 - Coveralls

@iamacook iamacook merged commit 2cb5415 into main Jul 4, 2024
16 checks passed
@iamacook iamacook deleted the swap-transfer-type-check branch July 4, 2024 13:12
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.

3 participants