GoodDollar / GoodCollective

Monorepo for GoodCollective (Segmented UBI and Direct Payments Pool)
MIT License
3 stars 1 forks source link

how to get the first and last name of users? #76

Closed krisbitney closed 5 months ago

krisbitney commented 6 months ago

The UI design suggests there is an intention of using user first and last names. How would these be obtained?

sirpy commented 6 months ago

You will need to query the mongodb backend. Results should be cached if exists and not query the backend again for a while. if need to fetch multiple names then queries should be in parallel, ie using await promise.all I'll provide credentials on slack

walletHash = keccack256(walletAddress)
findOne({"index.walletAddress.hash":walletHash},{"fullName.display":true})
krisbitney commented 6 months ago

After a few hours of looking into this, I learned that you will need to create a MongoDB Realm to query from the browser

The mongodb package is a NodeJS package

I have a looked for another way, but it seems you need to either create a Realm or run a NodeJS server

krisbitney commented 6 months ago

resolved in https://github.com/GoodDollar/GoodCollective/pull/113