Open mkurapov opened 1 month ago
Is there anyone working on this yet? I'd like to try it:)
Is there anyone working on this yet? I'd like to try it:)
Go for it :)
Hi, I looked at the code and then I thought it would be enough modifying the wallet addres url to lower case before it got registered in the database.
When i tested the wallet address creation in Rafiki Admin it stored the wallet address url in lower case successfully. Then I tested a wallet address creation via bruno scenarios and the wallet address was succesfully created as well. However the sucessive events failed; this because the middleware was still case sensitive.
By this time i left my code letting both the storage and the getWalletAddressUrl using the 'toLowerCase' function. This seems to patch the case-sensitiveness in the storing and in the looking. I don't know if the modified storage would affect any other scenarios. What would your feedback be?
When i tested the wallet address creation in Rafiki Admin it stored the wallet address url in lower case successfully.
Even if you had upper case characters in the URL, correct?
However the sucessive events failed; this because the middleware was still case sensitive.
What exactly did you end up trying? So I can understand correctly
That's correct, it stores the url in lower case even if it has a upper case characters.
In first place i just convert to lowercase the url
And then i added this to the methods where we obtain the url
I made the middleware modifications because when i did some tests rafiki looked for the wallet address as it was firstly written it looked for it using the url with the upper case, when they're only stored in lower case
@s100tist feel free to open a draft PR such that we can see what you did 🙂
Context
Because wallet addresses (and payment pointers) are in fact URLs, they should be case INsensitive. Currently, we are storing them in the DB simply as unique
string
without doing any cleanup beforehand, meaning, they are technically case-sensitive now.Todos
backend
are case-insensitive