mirror of https://github.com/dap-ps/discover.git
Discover updated to the working version
This commit is contained in:
parent
988b19d2f6
commit
f9b0f3b94d
|
@ -21,9 +21,6 @@ contract Discover is ApproveAndCallFallBack, BancorFormula {
|
|||
// The max amount of tokens it is possible to stake, as a percentage of the total in circulation
|
||||
uint public max;
|
||||
|
||||
// Need to multiply by 10^18 because tokens on Ethereum...
|
||||
uint public maxCheck;
|
||||
|
||||
// Decimal precision for this contract
|
||||
uint public decimals;
|
||||
|
||||
|
@ -60,7 +57,7 @@ contract Discover is ApproveAndCallFallBack, BancorFormula {
|
|||
|
||||
ceiling = 292; // See here for more: https://observablehq.com/@andytudhope/dapp-store-snt-curation-mechanism
|
||||
|
||||
decimals = 1000000; // 4 decimal points for %, 2 because we only use 1/100th of total in existence
|
||||
decimals = 1000000; // 4 decimal points for %, 2 because we only use 1/100th of total in circulation
|
||||
|
||||
max = total.mul(ceiling).div(decimals);
|
||||
|
||||
|
@ -227,7 +224,7 @@ contract Discover is ApproveAndCallFallBack, BancorFormula {
|
|||
*/
|
||||
function upvoteEffect(bytes32 _id, uint _amount) external view returns(uint effect) {
|
||||
Data memory d = _getDAppById(_id);
|
||||
require(d.balance.add(_amount) <= maxCheck, "You cannot upvote by this much, try with a lower amount");
|
||||
require(d.balance.add(_amount) <= safeMax, "You cannot upvote by this much, try with a lower amount");
|
||||
|
||||
// Special case - no downvotes yet cast
|
||||
if (d.votesCast == 0) {
|
||||
|
|
Loading…
Reference in New Issue