mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-15 04:25:27 +00:00
3375484f79
* Use cosmossdk.io/errors for deprecated error methods * Update error registration with cosmossdk.io/errors * Use cosmossdk.io/math for deprecated sdk.Int alias * Fix modified proto file * Update sdk.Int usage in swap hooks * Update e2e test deprecated method usage
26 lines
767 B
Go
26 lines
767 B
Go
package keeper
|
|
|
|
import (
|
|
sdkmath "cosmossdk.io/math"
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
"github.com/kava-labs/kava/x/swap/types"
|
|
)
|
|
|
|
// Implements SwapHooks interface
|
|
var _ types.SwapHooks = Keeper{}
|
|
|
|
// AfterPoolDepositCreated - call hook if registered
|
|
func (k Keeper) AfterPoolDepositCreated(ctx sdk.Context, poolID string, depositor sdk.AccAddress, sharesOwned sdkmath.Int) {
|
|
if k.hooks != nil {
|
|
k.hooks.AfterPoolDepositCreated(ctx, poolID, depositor, sharesOwned)
|
|
}
|
|
}
|
|
|
|
// BeforePoolDepositModified - call hook if registered
|
|
func (k Keeper) BeforePoolDepositModified(ctx sdk.Context, poolID string, depositor sdk.AccAddress, sharesOwned sdkmath.Int) {
|
|
if k.hooks != nil {
|
|
k.hooks.BeforePoolDepositModified(ctx, poolID, depositor, sharesOwned)
|
|
}
|
|
}
|