Skip to content

Commit fee85cf

Browse files
p0mvnmergify[bot]
authored andcommitted
refactor(x/mint): remove unused parameter from AfterDistributeMintedCoin (#2390)
* refactor(x/mint): remove unused parameter from AfterDistributeMintedCoin * remove param from mint hook mock * changelog (cherry picked from commit 2530987) # Conflicts: # CHANGELOG.md # x/mint/types/hooks.go
1 parent 2a45d28 commit fee85cf

File tree

5 files changed

+28
-5
lines changed

5 files changed

+28
-5
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,23 @@ This release contains minor CLI bug fixes.
103103
* [#1671](https://github.com/osmosis-labs/osmosis/pull/1671) Add hourly epochs to `x/epochs` DefaultGenesis.
104104
* [#1665](https://github.com/osmosis-labs/osmosis/pull/1665) Delete app/App interface, instead use simapp.App
105105
* [#1630](https://github.com/osmosis-labs/osmosis/pull/1630) Delete the v043_temp module, now that we're on an updated SDK version.
106+
<<<<<<< HEAD
107+
=======
108+
* [#1667](https://github.com/osmosis-labs/osmosis/pull/1673) Move wasm-bindings code out of app package into its own root level package.
109+
* [#2013](https://github.com/osmosis-labs/osmosis/pull/2013) Make `SetParams`, `SetPool`, `SetTotalLiquidity`, and `SetDenomLiquidity` GAMM APIs private
110+
* [#1857](https://github.com/osmosis-labs/osmosis/pull/1857) x/mint rename GetLastHalvenEpochNum to GetLastReductionEpochNum
111+
* [#2390](https://github.com/osmosis-labs/osmosis/pull/2390) x/mint remove unused mintCoins parameter from AfterDistributeMintedCoin
112+
113+
### Features
114+
115+
* [#2387](https://github.com/osmosis-labs/osmosis/pull/2387) Upgrade to IBC v3.2.0, which allows for sending/receiving IBC tokens with slashes.
116+
* [#2057](https://github.com/osmosis-labs/osmosis/pull/2057) Reduce block times to about three seconds
117+
* [#1312] Stableswap: Createpool logic
118+
* [#1230] Stableswap CFMM equations
119+
* [#1429] solver for multi-asset CFMM
120+
* [#1539] Superfluid: Combine superfluid and staking query on querying delegation by delegator
121+
* [#2223] Tokenfactory: Add SetMetadata functionality
122+
>>>>>>> 25309871 (refactor(x/mint): remove unused parameter from AfterDistributeMintedCoin (#2390))
106123
107124
### Bug Fixes
108125

x/mint/keeper/keeper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ func (k Keeper) DistributeMintedCoin(ctx sdk.Context, mintedCoin sdk.Coin) error
229229
}
230230

231231
// call an hook after the minting and distribution of new coins
232-
k.hooks.AfterDistributeMintedCoin(ctx, mintedCoin)
232+
k.hooks.AfterDistributeMintedCoin(ctx)
233233

234234
return err
235235
}

x/mint/keeper/keeper_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type mintHooksMock struct {
2929
hookCallCount int
3030
}
3131

32-
func (hm *mintHooksMock) AfterDistributeMintedCoin(ctx sdk.Context, mintedCoin sdk.Coin) {
32+
func (hm *mintHooksMock) AfterDistributeMintedCoin(ctx sdk.Context) {
3333
hm.hookCallCount++
3434
}
3535

x/mint/types/hooks.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
)
66

77
type MintHooks interface {
8-
AfterDistributeMintedCoin(ctx sdk.Context, mintedCoin sdk.Coin)
8+
AfterDistributeMintedCoin(ctx sdk.Context)
99
}
1010

1111
var _ MintHooks = MultiMintHooks{}
@@ -17,8 +17,14 @@ func NewMultiMintHooks(hooks ...MintHooks) MultiMintHooks {
1717
return hooks
1818
}
1919

20+
<<<<<<< HEAD
2021
func (h MultiMintHooks) AfterDistributeMintedCoin(ctx sdk.Context, mintedCoin sdk.Coin) {
22+
=======
23+
// AfterDistributeMintedCoin is a hook that runs after minter mints and distributes coins
24+
// at the beginning of each epoch.
25+
func (h MultiMintHooks) AfterDistributeMintedCoin(ctx sdk.Context) {
26+
>>>>>>> 25309871 (refactor(x/mint): remove unused parameter from AfterDistributeMintedCoin (#2390))
2127
for i := range h {
22-
h[i].AfterDistributeMintedCoin(ctx, mintedCoin)
28+
h[i].AfterDistributeMintedCoin(ctx)
2329
}
2430
}

x/pool-incentives/keeper/hooks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func (h Hooks) AfterSwap(ctx sdk.Context, sender sdk.AccAddress, poolId uint64,
3636
}
3737

3838
// Distribute coins after minter module allocate assets to pool-incentives module.
39-
func (h Hooks) AfterDistributeMintedCoin(ctx sdk.Context, mintedCoin sdk.Coin) {
39+
func (h Hooks) AfterDistributeMintedCoin(ctx sdk.Context) {
4040
// @Sunny, @Tony, @Dev, what comments should we keep after modifying own BeginBlocker to hooks?
4141

4242
// WARNING: The order of how modules interact with the default distribution module matters if the distribution module is used in a similar way to:

0 commit comments

Comments
 (0)