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

chore: refactor ipfs config and metadata retrieval #1517

Merged
merged 4 commits into from
Nov 25, 2024

Conversation

svienot
Copy link
Collaborator

@svienot svienot commented Nov 25, 2024

Description:

  • rename CoreConfig.ipfsGatewayUrlPrefix to CoreConfig.ipfsGatewayURL
  • Although the implementation now checks for CoreConfig.ipfsGatewayURL = null, the default value for this parameter remains https://gateway.pinata.cloud/ipfs/ for the time being.
  • refactor TokenMetadataAnalyzer such that logic to retrieve assets from attributes values is a bit more modular and shared.
  • refactor BlobValue to reuse some of the above.

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

…s value to be null (null meaning: no IPFS resolution).

Signed-off-by: Simon Viénot <simon.vienot@icloud.com>
Signed-off-by: Simon Viénot <simon.vienot@icloud.com>
Signed-off-by: Simon Viénot <simon.vienot@icloud.com>
Signed-off-by: Simon Viénot <simon.vienot@icloud.com>
Copy link

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 74.96% 24726 / 32984
🔵 Statements 74.96% 24726 / 32984
🔵 Functions 59.89% 996 / 1663
🔵 Branches 83.81% 4724 / 5636
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/components/token/NftCell.vue 98.68% 96% 100% 98.68% 111
src/components/token/TokenMetadataAnalyzer.ts 78.34% 80% 100% 78.34% 100-102, 104, 142-146, 154-168, 233-234, 251-252, 262-268, 282-283, 285-288, 302-303, 305-308
src/components/values/BlobValue.vue 89.51% 79.31% 100% 89.51% 36-37, 39, 45-47, 123-127, 143-144
src/config/CoreConfig.ts 81.66% 100% 66.66% 81.66% 36-44, 51-52
src/pages/NftDetails.vue 92.75% 85.96% 33.33% 92.75% 251, 280, 283-284, 289, 328-334, 362-370
src/pages/TokenDetails.vue 97.7% 97.22% 66.66% 97.7% 439, 472-477, 512-513
src/utils/URLUtils.ts 96.55% 95.45% 100% 96.55% 61-62
Generated in workflow #1471

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Copy link
Collaborator

@ericleponner ericleponner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@svienot svienot merged commit a233864 into main Nov 25, 2024
11 of 12 checks passed
@svienot svienot deleted the chore-IPFS-and-metadata branch November 25, 2024 15:14
@swirlds-automation
Copy link
Contributor

🎉 This PR is included in version 24.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants