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

feat: Expose zero remaining value orders from cf_pool_orders RPC #5042

Merged
merged 4 commits into from
Jul 22, 2024

Conversation

marcellorigotti
Copy link
Contributor

@marcellorigotti marcellorigotti commented Jul 15, 2024

Pull Request

Closes: PRO-1462

Checklist

Please conduct a thorough self-review before opening the PR.

  • I am confident that the code works.
  • I have updated documentation where appropriate.

Summary

Add optional parameter to cf_pool_orders (filled_orders: Option<bool>)

  • Default to false if not specified
  • If set to true orders with an amount of 0 (filled orders) are included in the response, otherwise they are excluded (previous behaviour)
  • open_order_count includes these empty orders

Copy link

codecov bot commented Jul 15, 2024

Codecov Report

Attention: Patch coverage is 40.74074% with 16 lines in your changes missing coverage. Please review.

Project coverage is 71%. Comparing base (fe8b41b) to head (18c2b33).

Files Patch % Lines
state-chain/custom-rpc/src/lib.rs 0% 8 Missing ⚠️
state-chain/pallets/cf-pools/src/lib.rs 25% 6 Missing ⚠️
state-chain/runtime/src/lib.rs 0% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##            main   #5042    +/-   ##
======================================
- Coverage     71%     71%    -0%     
======================================
  Files        441     441            
  Lines      76362   76229   -133     
  Branches   76362   76229   -133     
======================================
- Hits       54567   54363   -204     
- Misses     18915   18977    +62     
- Partials    2880    2889     +9     

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

@kylezs kylezs requested a review from AlastairHolmes July 16, 2024 11:21
@marcellorigotti marcellorigotti added this pull request to the merge queue Jul 22, 2024
Merged via the queue into main with commit 695c609 Jul 22, 2024
47 checks passed
@marcellorigotti marcellorigotti deleted the feature/pro-1462 branch July 22, 2024 10:39
martin-chainflip pushed a commit that referenced this pull request Jul 24, 2024
* add additional parameter to cf_pool_orders (filled_orders: boolean)

* Include zero size orders in the count

* open_order_balance -> it doesn't matter if we include/exclude zero value orders since their balance is zero

* fmt
martin-chainflip pushed a commit that referenced this pull request Jul 24, 2024
* add additional parameter to cf_pool_orders (filled_orders: boolean)

* Include zero size orders in the count

* open_order_balance -> it doesn't matter if we include/exclude zero value orders since their balance is zero

* fmt
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.

2 participants