Skip to content

Commit

Permalink
fix wiring
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed Apr 16, 2024
1 parent 87286fb commit cd5cbf2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ func New(
app.AuctionKeeperB = auctionkeeper.NewBuilder(
appCodec,
keys[auction.StoreKey],
auctionmodule.SubAccounts(),
app.BankKeeper,
app.UGovKeeperB.EmergencyGroup,
)
Expand Down
25 changes: 9 additions & 16 deletions x/auction/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,7 @@ var (

// AppModuleBasic implements the AppModuleBasic interface for the x/leverage
// module.
type AppModuleBasic struct {
cdc codec.Codec
}

func NewAppModuleBasic(cdc codec.Codec) AppModuleBasic {
return AppModuleBasic{cdc: cdc}
}
type AppModuleBasic struct{}

// Name returns the x/auction module's name.
func (AppModuleBasic) Name() string {
Expand Down Expand Up @@ -109,7 +103,7 @@ func NewAppModule(
cdc codec.Codec, keeper keeper.Builder, bk auction.BankKeeper,
) AppModule {
return AppModule{
AppModuleBasic: NewAppModuleBasic(cdc),
AppModuleBasic: AppModuleBasic{},
kb: keeper,
bankKeeper: bk,
}
Expand Down Expand Up @@ -165,12 +159,11 @@ var (
subaccRewardsBid = []byte{0x02}
)

// RewardsAccount returns address of an account holding rewards for auction
func (am AppModule) RewardsAccount() []byte {
return address.Module(am.Name(), subaccRewards)
}

// RewardsAccount returns address holding auction bid
func (am AppModule) RewardsAccountBid() []byte {
return address.Module(am.Name(), subaccRewardsBid)
// SubAccounts for auction Keeper
func SubAccounts() keeper.SubAccounts {
n := AppModuleBasic{}.Name()
return keeper.SubAccounts{
Rewards: address.Module(n, subaccRewards),
RewardsBid: address.Module(n, subaccRewardsBid),
}
}

0 comments on commit cd5cbf2

Please sign in to comment.