Skip to content

Commit

Permalink
Mints
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonWeng committed Apr 25, 2023
1 parent 76c2d92 commit f34981b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions x/mint/keeper/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func (k Keeper) AfterEpochEnd(ctx sdk.Context, epoch epochTypes.Epoch) {
// Released Succssfully, decrement the remaining amount by the daily release amount and update minter
amountMinted := coinsToMint.AmountOf(latestMinter.GetDenom())
updatedMinter := latestMinter.RecordSuccessfulMint(ctx, epoch, amountMinted.Uint64())
k.Logger(ctx).Info("Minted coins", "minter", updatedMinter, "amount", amountMinted)
k.SetMinter(ctx, updatedMinter)
}

Expand Down
2 changes: 1 addition & 1 deletion x/mint/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (k Keeper) GetOrUpdateLatestMinter(
currentReleaseMinter := k.GetMinter(ctx)
nextScheduledRelease := GetNextScheduledTokenRelease(epoch, params.TokenReleaseSchedule, currentReleaseMinter)

// There's still an ongoing release
// There's still an ongoing release or there's no release scheduled
if currentReleaseMinter.OngoingRelease() || nextScheduledRelease == nil {
k.Logger(ctx).Debug("Ongoing token release or no nextScheduledRelease", "minter", currentReleaseMinter)
return currentReleaseMinter
Expand Down
1 change: 0 additions & 1 deletion x/mint/types/minter.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ func (m Minter) getReleaseAmountToday(currentTime time.Time) uint64 {

numberOfDaysLeft := m.getNumberOfDaysLeft(currentTime)
if numberOfDaysLeft == 0 {
fmt.Printf("Minter: Nothing Left!: %d\n", m.GetRemainingMintAmount())
return 0
}
return m.GetRemainingMintAmount() / numberOfDaysLeft
Expand Down

0 comments on commit f34981b

Please sign in to comment.