Skip to content

Commit

Permalink
fix nits
Browse files Browse the repository at this point in the history
  • Loading branch information
likhita-809 committed May 5, 2024
1 parent 3100806 commit d99ba32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions x/protocolpool/keeper/genesis.go
Expand Up @@ -30,8 +30,8 @@ func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error
if budget.LastClaimedAt == nil || budget.LastClaimedAt.IsZero() {
budget.LastClaimedAt = &currentTime
}
// ignore budgets with period <= 0
if budget.Period != nil && budget.Period.Seconds() <= 0 {
// ignore budgets with period <= 0 || nil
if budget.Period == nil || (budget.Period != nil && budget.Period.Seconds() <= 0) {
continue
}

Expand Down
1 change: 0 additions & 1 deletion x/protocolpool/keeper/msg_server_test.go
Expand Up @@ -242,7 +242,6 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() {
hinfo := suite.environment.HeaderService.HeaderInfo(suite.ctx)
hinfo.Time = hinfo.Time.Add(240 * time.Hour)
suite.ctx = suite.ctx.WithHeaderInfo(hinfo)

},
recipientAddress: recipientAddr,
claimableFunds: sdk.NewInt64Coin("foo", 100), // claiming the whole budget, 2 * 50foo = 100foo
Expand Down

0 comments on commit d99ba32

Please sign in to comment.