Skip to content

Commit

Permalink
refactor: use new functions signature after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
manu0466 committed Dec 12, 2024
1 parent 3d814c5 commit d9d4ddc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions x/rewards/simulation/msg_factory.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package simulation

import (
"errors"
"fmt"
"math/rand"
"time"

"cosmossdk.io/collections"
"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
Expand Down Expand Up @@ -213,13 +215,13 @@ func SimulateMsgEditRewardsPlan(
}

// Get the service admin
service, found, err := sk.GetService(ctx, plan.ServiceID)
service, err := sk.GetService(ctx, plan.ServiceID)
if err != nil {
if errors.Is(err, collections.ErrNotFound) {
return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "service not found"), nil, nil
}
panic(err)
}
if !found {
return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "service not found"), nil, nil
}

adminAddress, err := sdk.AccAddressFromBech32(service.Admin)
if err != nil {
Expand Down

0 comments on commit d9d4ddc

Please sign in to comment.