poanetwork / token-wizard

(Discontinued) TokenWizard is an DApp to create and manage crowdsale and token contracts using a simple UI
MIT License
384 stars 215 forks source link

(Feature) display max contribution limit for a whitelisted user in contribution page #1050

Closed mariano-aguero closed 6 years ago

mariano-aguero commented 6 years ago

Closes #1027

dennis00010011b commented 6 years ago

@mariano-aguero Contribution page - Minted, no whitelist: min contribution value didn't changed after purchase

screen shot 2018-07-17 at 07 17 22
dennis00010011b commented 6 years ago

@mariano-aguero Investor not allowed to buy less than minCap after first transaction

screen shot 2018-07-17 at 07 26 21
mariano-aguero commented 6 years ago

@dennis00010011b
Currently that value (min contribution) does not change, depending on the business rule should it change? Is it a value that only serves to inform the user and should remain constant? If it should change then I suggest creating another issue since it has nothing to do with the original, and please specify how that field should change (A real example will help, what amounts should appear, etc) Thanks

mariano-aguero commented 6 years ago

@dennis00010011b As it currently works, the min contribution applies to all transactions, if that is not the case, another issue should be created and we must change that. Regards

dennis00010011b commented 6 years ago

@mariano-aguero The min contribution is not applied to all transactions, only to first transaction for each account. It is current implementation in branch 2.0

dennis00010011b commented 6 years ago

@mariano-aguero

Currently that value (min contribution) does not change, depending on the business rule should it change?
Is it a value that only serves to inform the user and should remain constant?

Min contribution field should display current min contribution value for given account( both whitelisted or minCap case ) Example: minCap =13 1.Account hasn't bought yet , min contribution field = 13

  1. Account has bought amount =13, min contribution field = 0.000001 (real value depends of decimals).
dennis00010011b commented 6 years ago

@mariano-aguero Dutch Auction:

  1. min contribution field is not changed after purchase
  2. Minor GUI issue in field max contribution screen shot 2018-07-17 at 08 30 09
mariano-aguero commented 6 years ago

Thanks @dennis00010011b for your explanation. I really appreciate it

Minor GUI issue in field max contribution

Moved the block down, long data placed horizontally bring these kinds of problems

min contribution field is not changed after purchase

I change the function that calculate the min contribution field, use the old one right now

dennis00010011b commented 6 years ago

@mariano-aguero I think fields max contribution and min contribution should be the same and contains the text "You are not allowed" when user is not allowed to buy Steps for reproduce:

  1. Create Minted crowdsale with whitelist address
  2. Buy allowed maxCap as a whitelisted investor
  3. Refresh the page
screen shot 2018-07-17 at 10 31 52
mariano-aguero commented 6 years ago

@dennis00010011b

I think fields max contribution and min contribution should be the same and contains the text "You are not allowed" when user is not allowed to buy

Done

dennis00010011b commented 6 years ago

@mariano-aguero Steps:

  1. Create Minted crowdsale with 1 whitelist address
  2. As whitelisted investor buy maximum amount in first transaction
  3. Refresh page screen shot 2018-07-17 at 12 34 09
BlackDuckCoPilot commented 6 years ago

Black Duck Security Report

Branch 2.0 has no Black Duck results, and could not be compared to #1050. Analyze branch 2.0 to get a change comparison.

Removed Components

Medium Risk: 2 Clean: 1496

Click here to see full report

mariano-aguero commented 6 years ago

Hi @dennis00010011b I added a function to check if a crowdsale is really end for the logged user, is used to validate the appearance of the suggested text.

Regards

vbaranov commented 6 years ago

@mariano-aguero please resolve merging conflicts

mariano-aguero commented 6 years ago

@vbaranov solved!

vbaranov commented 6 years ago

@mariano-aguero I approved. But in the future let's consider to reuse data from currentTierInfo, currentTierStatus etc. We make multiple calls to the same functions in smart-contracts for a single page.