spruceid / tzprofiles

Create portable verified profiles on Tezos with public accounts.
https://tzprofiles.com
Apache License 2.0
38 stars 17 forks source link

Adds social media claim type infrastructure and README section for ad… #123

Closed krhoda closed 3 years ago

krhoda commented 3 years ago

…ding new claim types

This should be merged sooner than the Instagram claim will be done (pending approval of FB and all that) because it creates a generalized way to add new claims along with README material to aid in those efforts.

cloudflare-pages[bot] commented 3 years ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: e5510a1
Status: ✅  Deploy successful!
Preview URL: https://5167e522.tzprofiles.pages.dev

View logs

krhoda commented 3 years ago

That's quite a few places to add a new claim in. Does the type system catches omissions in the various switch statements?

Yes, that's what the exhaustiveCheck does is force TS to make sure that all types are accounted for in a switch statement without a default clause. It is quite a few places to add the new claim in, but getting the UI generated off of it is a big win. When copy is changed, you just have to adjust a data structure rather than find all the places it was hard coded.