Skip to content

Commit

Permalink
Add bounds check
Browse files Browse the repository at this point in the history
  • Loading branch information
wbt committed Oct 22, 2023
1 parent 803e0cc commit ba746e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/hardhat/contracts/SubscryptoToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ contract SubscryptoToken is ERC20, ERC20Burnable, Ownable, ERC20Permit {
address customer,
uint tierIndex
) private {
require(tierIndex < tiers[merchant].length, 'No such tier offered by this merchant.');
accountAtSubscriptionEnd(merchant, customer);
subscriptions[merchant][customer] = Subscription({
tier: tierIndex,
Expand Down

0 comments on commit ba746e9

Please sign in to comment.