GoodDollar / GoodIdentity

A decentralized organization that handles Identity verification to its members.
2 stars 0 forks source link

V0.5 - Implement Register Flow using DAOStack API #1

Open hadarbmdev opened 5 years ago

hadarbmdev commented 5 years ago

Goal: Create a simple Register flow in which a new person inserts his/her basic details (name, phone, social accounts, feeAmount) in a very basic UI form (based on React-native elements).

The registered data should be used in the Register methid in IDDao.js file, this is the method signature: register(userData:UserStoredData, feeAmount:number): string

The Register method should:

  1. Create a hash of the userStoredData
  2. Create an object of userStoredData + the hash of the userStoredData ({userStoredData:..., hashedUserStoredData:..})
  3. Save the object on GunDB
  4. Use the GunDB location for registration to DAOStack:
  1. Return proposeProfile TxHash
hadarbmdev commented 5 years ago

@sirpy Please review

sirpy commented 5 years ago

Where does the user data comes from in the first place? is that the user profile saved on gundb also? the saved userdata+hash needs to be immutable, we need to see how to implement that in gundb or use ipfs.

hadarbmdev commented 5 years ago

Hey, The user data is create on the Register screen, using the user input to the name and social media input fields.

Once submitted, it is converted to UserProfile object: type UserProfile = { profile: string, // The profile hashed_profile: string, // The hashed data of the user at the point of creating this instance }

Then the full object above is saved to gundb. Regarding immutability - I agree, I will open it on a new ticket for future versions.