Skip to content

[MEX-961] enable proto-loader arrays#1741

Merged
claudiulataretu merged 1 commit intofeat/state-rpcfrom
MEX-961-fixes-after-testing
Feb 12, 2026
Merged

[MEX-961] enable proto-loader arrays#1741
claudiulataretu merged 1 commit intofeat/state-rpcfrom
MEX-961-fixes-after-testing

Conversation

@claudiulataretu
Copy link
Collaborator

Reasoning

  • both client and server proto will deserialize empty arrays in [] instead of undefined

Proposed Changes

  • update handlers to use empty arrays instead of undefined
  • remove unnecessary formatters from proto undefined deserialization

How to test

query GetDualYieldRewardsForPosition {
    getDualYieldRewardsForPosition(proxyStakingPositions: {
        farmsPositions: []
    }) {
        stakingRewards {
            rewards
        }
        farmRewards {
            rewards
        }
    }
}
  • query should return an empty array instead of error

- both client and server proto will deserialize empty arrays in [] instead
of undefined
- update handlers to use empty arrays instead of undefined
- remove unnecessary formatters from proto undefined deserialization

Signed-off-by: Claudiu Lataretu <claudiu.lataretu@gmail.com>
@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

❌ Patch coverage is 12.50000% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.65%. Comparing base (01132ca) to head (2dc8d7e).
⚠️ Report is 3 commits behind head on feat/state-rpc.

Files with missing lines Patch % Lines
src/modules/state/services/pairs.state.service.ts 0.00% 10 Missing ⚠️
...rc/modules/state/services/staking.state.service.ts 0.00% 5 Missing ⚠️
src/modules/state/utils/state.format.utils.ts 42.85% 4 Missing ⚠️
src/modules/state/services/farms.state.service.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           feat/state-rpc    #1741      +/-   ##
==================================================
+ Coverage           53.42%   53.65%   +0.22%     
==================================================
  Files                 300      300              
  Lines               14330    14268      -62     
  Branches             1916     1875      -41     
==================================================
- Hits                 7656     7655       -1     
+ Misses               6668     6607      -61     
  Partials                6        6              
Flag Coverage Δ
unittests 53.65% <12.50%> (+0.22%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@claudiulataretu claudiulataretu merged commit 6fb2099 into feat/state-rpc Feb 12, 2026
3 of 4 checks passed
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