ipfs / ipfs/ipfs-webui

Improve Implicit `service:cid` Conversion

Open
#2,042 1 comment 1 reaction 0 assignees View on GitHub
exp/intermediate kind/discussion kind/enhancement P2 status/ready topic/design-content
Dominant language
JavaScript
Stars
1.6k
Forks
534
PR merge metrics
No merged PRs in 30d

Description

In multiple places of our code base, we convert pin information, stored as `service:cid`, using `.split(':')`. This can open the way for some bugs (unlikely unless some data is corrupted or manually changed in the user's local storage). We can replace this instances by some method that validates the string and returns the expected output.

https://github.com/ipfs/ipfs-webui/blob/183c476581fcbfa612aacf6b3622a9d6a8620afc/src/bundles/pinning.js#L13-L15

https://github.com/ipfs/ipfs-webui/blob/83ceac1066a00771fd618e3d58b0617268c7bacc/src/files/files-list/FilesList.js#L26

And some others introduced in https://github.com/ipfs/ipfs-webui/pull/1919.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.