jurteam / platform

Jur Beta Platform
https://beta.jur.io
0 stars 0 forks source link

Existing user's disclaimer is not getting accepted #337

Closed ashishjur closed 4 years ago

ashishjur commented 4 years ago

If a user is created via a non dApp method (e.g. making a wallet an Advocate through smart contract), then dApp doesn't accept the disclaimer.

Expected Behavior

Irrespective of the user's existence in DB, if the disclaimer is not accepted, the user should be able to accept it from dApp.

Current Behavior

  1. dApp doesn't send make API call to the backend to accept the disclaimer of existing users.
  2. User PUT request fails if sent with params accepted_disclaimer: true as accepted_terms must also be true.

Possible Solution

  1. Send a request from dApp for accepting a disclaimer if not already accepted.
  2. Allow user to accept disclaimer without accepting terms.

Steps to Reproduce

Environment: Temp

  1. Create a new wallet
  2. Make that wallet an advocate. This will also create DB entry of the wallet as backend is listening to polling service.
  3. Sign in to dApp using this new wallet for the first time.
  4. Try accepting disclaimer. It won't make any update call.
ashishjur commented 4 years ago

To test it on local, you can set all user's accepted disclaimer to 0 in the DB.

update users set accepted_disclaimer=0;

Or for a single user:

update users set accepted_disclaimer=0 where wallet="0xA929A33Fa2f3979Bb9CAC7951e91EB10B1483030";

And then see how disclaimer modal and footer work. Existing users and advocates created via polling service input should be able to accept disclaimer now.

It will show disclaimer modal on

  1. Click of mark as complete in advocate page
  2. Click of withdraw in advocate page
  3. Click of take oath button in my oaths page
tyagishuchi1 commented 4 years ago

missing backend API

mtmsuhail commented 4 years ago

missing backend API

Deployed on Temp Server