Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

convertIpfsCidV0ToByte32 does not return correct values #1

Open
lorenzopolidori opened this issue Jul 12, 2022 · 1 comment
Open

convertIpfsCidV0ToByte32 does not return correct values #1

lorenzopolidori opened this issue Jul 12, 2022 · 1 comment

Comments

@lorenzopolidori
Copy link

This line does not convert the CID to a base 64 string:

const buffer = Buffer.from(bs58.decode(cid).slice(2).toString('base64'), 'base64');

I think this should be replaced with:

const uint8Array = bs58.decode(cid).slice(2)
const base64 = Buffer.from(uint8Array).toString('base64')
@emg110
Copy link
Owner

emg110 commented Jul 12, 2022

Thanks for using this code! Sure I will check this! A while ago It was!:D

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

No branches or pull requests

2 participants