-
Notifications
You must be signed in to change notification settings - Fork 0
Fix price and rate calculation (WARN - it will allow prices be not integer) #84
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workinginvalidThis doesn't seem rightThis doesn't seem rightwontfixThis will not be worked onThis will not be worked on
Description
Problem:
https://github.com/MoonSHRD/MS-Factory/blob/feat/hold/contracts/721/singleton/TicketFactory721.sol#L86
Unneccesarity conversion from wei to ether at contract side
This conversion should be done at client side
Way to solution:
-
remove conversion from
https://github.com/MoonSHRD/MS-Factory/blob/feat/hold/contracts/721/singleton/TicketFactory721.sol#L86 -
refactor
uint256 ta = (weiAmount / (1 ether)) / (_rate / (1 ether));
to
uint256 ta = weiAmount / _rate;
at
https://github.com/MoonSHRD/MS-Factory/blob/feat/hold/contracts/721/singleton/TokenSale721.sol#L247 -
add
web3.toWeiconversion at client side, in moment, when we setting up price
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinginvalidThis doesn't seem rightThis doesn't seem rightwontfixThis will not be worked onThis will not be worked on