Closed KindaSloth closed 2 years ago
@samuelWilliams99 about using libraries, I tried a couple of ones, but unfortunately, none works as expected.
And about the other comments, thanks for the review, I'll fix these points.
For some reason in my local machine the "make format" is not working properly, can someone check this?
Formatting fails didnt see your message, will do
@samuelWilliams99 if you can please run the formatter again here (don't know what is happening in my local env)
@Guilherme775 What's your issue with formatting? Do you run make format
inside nix shell?
The code seems quite involved. Was it not the case that there are just some prefixes in the base32 CID then the rest of the string is just regular base32?
I questioned the lack of external libraries for the logic, apparently they weren't sufficient. Given we're on a bit of a time limit, we can create a ticket to see if we can refactor this to something external later
We should also somehow make it clear in the signature of this function that it operates on base32 IPFS CIDs and not arbitrary base32 strings
Not sure if this is much better as I just changed most functions to deal with Text instead of CID (I don't have haskell development setup locally so it's a slow process to change types of things, and we're in a bit of a rush). This is a start though, at least the encoding function's type makes it clear now what it operates on. We can improve on this later, possibly in #39
cc @samuelWilliams99
22
CIDS tested:
CLI encoding:
Database records with our encoding: