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

Add method to ISwapsApi for fetching orders by transaction hash #1690

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Jun 25, 2024

Summary

Transfers returned by the Transaction Service do not contain the data of the relative transaction. This means that the transaction cannot be decoded to detect the settle call. As such, we need to fetch the order of a transaction by transaction hash.

This adds a new ISwapsApi['getOrders'] method that accepts the transaction hash, fetching the order book from CoW accodingly.

Changes

  • Add ISwapsApi['getOrders'] and implementation
  • Add ISwapsRepository['getOrders'] and validated implementation

@iamacook iamacook self-assigned this Jun 25, 2024
@iamacook iamacook requested a review from a team as a code owner June 25, 2024 11:07
@coveralls
Copy link

coveralls commented Jun 25, 2024

Pull Request Test Coverage Report for Build 9661310817

Details

  • 2 of 10 (20.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.04%) to 48.671%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/domain/swaps/swaps.repository.ts 1 4 25.0%
src/datasources/swaps-api/cowswap-api.service.ts 0 5 0.0%
Totals Coverage Status
Change from base Build 9653411332: -0.04%
Covered Lines: 4108
Relevant Lines: 6808

💛 - Coveralls

@hectorgomezv hectorgomezv merged commit 7adf4f3 into main Jun 26, 2024
16 checks passed
@hectorgomezv hectorgomezv deleted the swap-api-orders branch June 26, 2024 14:50
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