mx-api-service icon indicating copy to clipboard operation
mx-api-service copied to clipboard

type safe interactions with gateway

Open cfaur09 opened this issue 3 years ago • 2 comments

Proposed Changes

  • Instead of calling generic get/post methods on the gateway, implement for every endpoint on the gateway a function with explicit parameters and return type

How to test

  • every call from gateway service should return correct data

cfaur09 avatar Oct 30 '22 19:10 cfaur09

Codecov Report

Base: 66.98% // Head: 28.20% // Decreases project coverage by -38.77% :warning:

Coverage data is based on head (1d800b2) compared to base (6bcf526). Patch has no changes to coverable lines.

Additional details and impacted files
@@               Coverage Diff                @@
##           development     #877       +/-   ##
================================================
- Coverage        66.98%   28.20%   -38.78%     
================================================
  Files              501        7      -494     
  Lines            12718      234    -12484     
  Branches          1303        8     -1295     
================================================
- Hits              8519       66     -8453     
+ Misses            3052      160     -2892     
+ Partials          1147        8     -1139     
Flag Coverage Δ
integrationtests ?
unittests 28.20% <ø> (ø)

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

Impacted Files Coverage Δ
src/utils/dynamic.module.utils.ts 0.00% <0.00%> (-94.12%) :arrow_down:
src/utils/api.checker.ts 0.00% <0.00%> (-85.08%) :arrow_down:
src/utils/caching.utils.ts 15.38% <0.00%> (-61.54%) :arrow_down:
src/utils/typeorm.utils.ts 0.00% <0.00%> (-42.86%) :arrow_down:
src/utils/token.helpers.ts 39.58% <0.00%> (-29.17%) :arrow_down:
src/utils/cache.info.ts 53.75% <0.00%> (-28.75%) :arrow_down:
src/common/gateway/gateway.service.ts
src/common/locked-asset/locked-asset.service.ts
src/common/metrics/api.metrics.service.ts
src/common/protocol/protocol.service.ts
... and 490 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov-commenter avatar Oct 30 '22 19:10 codecov-commenter

LGTM

gabrielmatei avatar Nov 12 '22 14:11 gabrielmatei