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

account token collection roles as inner structure

Open cfaur09 opened this issue 3 years ago • 1 comments

Proposed Changes

  • add roles property to accounts/:account/roles/collections/:collection
  • add roles property to accounts/:account/roles/tokens/:token

How to test

API

  • accounts/erd1qqqqqqqqqqqqqpgq6xtqy9lda5cj5ts8kfvd8r89wy7n2dn58sts6dguut/roles/collections/MMAF-63c85a -> should contains roles attribute: roles": { "canCreate": true, "canBurn": true, "canAddUri": false, "canUpdateAttributes": false }

  • accounts/erd1qqqqqqqqqqqqqpgqnqvjnn4haygsw2hls2k9zjjadnjf9w7g2jpsmc60a4/roles/tokens/MEX-455c57 -> should contains roles attributes: roles: { "canLocalMint": true, "canLocalBurn": true }

  • accounts/erd1k4u77ve67r0ve8ywyjaq05pp8y59x683gudfffrwd64q56843kgsyld36e/collections/XMAXIM1-63599d -> should contain roles attribute

GraphQL

  • create query using tokenWithRolesForAddress and verify if roles property is defined

cfaur09 avatar Nov 07 '22 11:11 cfaur09

Codecov Report

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

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

Additional details and impacted files
@@               Coverage Diff                @@
##           development     #882       +/-   ##
================================================
- 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/endpoints/collections/collection.service.ts
src/endpoints/esdt/esdt.address.service.ts
src/endpoints/tokens/entities/token.with.roles.ts
src/endpoints/tokens/token.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 Nov 07 '22 12:11 codecov-commenter