Skip to content

Commit

Permalink
Updated buy tokens to <=
Browse files Browse the repository at this point in the history
  • Loading branch information
stanacton committed Jan 17, 2018
1 parent fd5dec1 commit 4ad1a80
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/truffle/contracts/PreICO.sol
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ contract PreICO is DelegateableOwnerToken {

function buyTokens() payable returns (bool) {
require(purchasesEnabled);
require(msg.value > minPurchase);
require(msg.value >= minPurchase);

uint multipler = _price;
uint refundAmount = 0;
Expand All @@ -74,6 +74,8 @@ contract PreICO is DelegateableOwnerToken {
}

uint tokens = this.calculateTokens(msg.value, multipler);

// Work out if a refund is needed.
if (balances[owner] < tokens) {
tokens = balances[owner];
uint ethCost = calculateTokensPrice(tokens, multipler);
Expand Down

0 comments on commit 4ad1a80

Please sign in to comment.