Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

fitbit presentation - change requests #35

Closed
11 tasks done
serapath opened this issue Sep 20, 2018 · 5 comments
Closed
11 tasks done

fitbit presentation - change requests #35

serapath opened this issue Sep 20, 2018 · 5 comments
Assignees
Labels
#workshops specification category
Milestone

Comments

@serapath
Copy link
Contributor

serapath commented Sep 20, 2018

@todo

  • when the user signs up, the encrypted token should be stored in the contract (it's encrypted and because it's used to get beginStep it's now bound to our contract, so nobody else who would copy the encrypted token could use it
  • the methods kill and ownerWithdrawal should be removed
    • because we don't want to replace centralised servers with almighty owners
  • for funders, the minimum funding should be bigger than the users signup fee of 0.1
  • users should NEVER have to update their steps
    • instead, the frontend should fetch current steps from the fitbit web api to compare it to beginStep to show the user his progress
  • when the owner closes the round, the contract should now loop over all users and use their fitbit token to get their end steps
    • maybe you also need to save a beginDate and then compare the endDate to check if the average daily steps were 10.000
    • the user can close the round only once, so calling the method again will not be possible so the contract can never use the encrypted token again to check step data from users
  • if possible - this probably expensive transaction to get all steps from all users should be either paid by the funds in the contract or the owner should be re-imbursed for this by taking that amount from the funds
  • when users come to the page after the round was closed, they should be able to "withdraw" their funds from the contract to get them into their metamask account

@alincode
Copy link

item 2, 3 done.

@alincode
Copy link

item 1 done

@serapath
Copy link
Contributor Author

serapath commented Oct 10, 2018

  • add ability to set a custom duration (like e.g. 5 minutes) when deploying a contract instance, but (by default it's 30 days) => owner should only be allowed to close contest rount AFTER duration is over
  • allow https://alincode.github.io/fitbit-dapp#dev to show "debug buttons"
    • e.g. beginning of all javascript checks localStorage.debug = locatin.hash === "#dev"
    • including a button to load a different "contract address"
  • when in #dev mode, display a button to change contract instance address, so app loads with different contract
  • switch the entire contract to ROPSTEN test network
  • display on website how much time is left until the contest can close
    • e.g. steps in the next ${duration} ${unit ="days"} (10.000 steps per day)
    • add The Fitbit Contest ends in ${ duration - (now - start)} ${unit}
  • display to owner a button to "end contest" (but if duration is not over yet alert('wait for ' + duration - (now - start))

@serapath
Copy link
Contributor Author

serapath commented Oct 10, 2018

@ninabreznik

  • Can you make a PR to update the english "wording" to improve/change some variable or function names and maybe some other text (...maybe code comments, etc...)

@alincode
Copy link

alincode commented Oct 18, 2018

  • fix: updateAllUserStep should add userAddr parameter.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
#workshops specification category
Projects
None yet
Development

No branches or pull requests

3 participants