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

[SERVICES-2331] Pairs query extra fields #1346

Merged
merged 13 commits into from
May 17, 2024

Conversation

mad2sm0key
Copy link
Contributor

Reasoning

  • expose extra information about pools in pairs query

Proposed Changes

  • add extra fields and resolvers to PairModel: hasFarms, hasDualFarms, tradesCount, deployedAt
  • cache warm all the new fields for all pairs

How to test

query {
  pairs(
    limit: 100
  ) {
    address
    firstToken { 
      identifier
    }
    secondToken { 
      identifier
    }
    hasFarms
    hasDualFarms
    tradesCount
    deployedAt
  }
}

Copy link

codecov bot commented May 15, 2024

Codecov Report

Attention: Patch coverage is 54.54545% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 55.86%. Comparing base (e6267fb) to head (ee71d64).
Report is 67 commits behind head on development.

❗ Current head ee71d64 differs from pull request most recent head e7ceaa1. Consider uploading reports for the commit e7ceaa1 to get more accurate results

Files Patch % Lines
src/modules/pair/services/pair.compute.service.ts 47.05% 17 Missing and 1 partial ⚠️
src/modules/farm/mocks/farm.abi.factory.mock.ts 66.66% 2 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development    #1346      +/-   ##
===============================================
- Coverage        56.34%   55.86%   -0.49%     
===============================================
  Files              236      238       +2     
  Lines             7945     8178     +233     
  Branches           534      562      +28     
===============================================
+ Hits              4477     4569      +92     
- Misses            3013     3126     +113     
- Partials           455      483      +28     
Flag Coverage Δ
unittests 55.86% <54.54%> (-0.49%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

danielailie
danielailie previously approved these changes May 16, 2024
danielailie
danielailie previously approved these changes May 16, 2024
@bogdan-rosianu bogdan-rosianu self-requested a review May 16, 2024 08:37
src/modules/pair/services/pair.compute.service.ts Outdated Show resolved Hide resolved
src/modules/pair/services/pair.compute.service.ts Outdated Show resolved Hide resolved
src/services/crons/pair.cache.warmer.service.ts Outdated Show resolved Hide resolved
src/modules/farm/mocks/farm.abi.factory.mock.ts Outdated Show resolved Hide resolved
src/modules/pair/services/pair.compute.service.ts Outdated Show resolved Hide resolved
- use FarmAbiV2 directly instead of using FarmAbiFactory
- remove unnecessary mock for farm abi factory and update unit test
- add extra constraint for transaction status on ES query
- update cache warmer Cron expression to "EVERY_MINUTE"
bogdan-rosianu
bogdan-rosianu previously approved these changes May 16, 2024
src/modules/pair/pair.module.ts Outdated Show resolved Hide resolved
@mad2sm0key mad2sm0key merged commit dcf0d2c into development May 17, 2024
1 check failed
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.

None yet

4 participants