vocdoni / vocdoni-node

A set of libraries and tools for the Vocdoni decentralized backend infrastructure, the main ground of our universally verifiable, privacy-centric and scalable digital voting protocol
GNU Affero General Public License v3.0
82 stars 16 forks source link

bug: account search error 404 for existing account #1348

Open elboletaire opened 2 days ago

elboletaire commented 2 days ago

Describe the bug An existing account does not appear on searches.

To Reproduce

Accessing the account returns data, since it exists

curl -s 'https://api-dev.vocdoni.net/v2/accounts/38d2BC91B89928f78cBaB3e4b1949e28787eC7a3' | jq

Doing a search for that account returns 404:

curl 'https://api-dev.vocdoni.net/v2/chain/organizations/filter/page/0' --compressed -X POST -H 'Content-Type: application/json' --data-raw '{"organizationId":"38d2BC91B89928f78cBaB3e4b1949e28787eC7a3"}' | jq
mvdan commented 2 days ago

Any particular reason why you are mixing uppercase and lowercase letters? That might be tripping up the search. We could normalize the input for this.

elboletaire commented 2 days ago

Probably due to copying it from metamask, which gives it that way.

jordipainan commented 2 days ago

Any particular reason why you are mixing uppercase and lowercase letters? That might be tripping up the search. We could normalize the input for this.

https://eips.ethereum.org/EIPS/eip-55

p4u commented 2 days ago

Yes, we should normalize it.

p4u commented 2 days ago

can yu take it @mvdan ?

mvdan commented 2 days ago

Ah I didn't know this, SGTM. Yes, I'll do a fix.