Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
chmllr committed Jan 17, 2025
1 parent a6824f3 commit c31a21b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 20 deletions.
3 changes: 1 addition & 2 deletions halo/evmstaking/evmstaking.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Package evmstaking monitors the Staking pre-deploy contract and converts
// Package evmstaking monitors the Staking pre-deploy contract and converts
// its log events to cosmosSDK x/staking logic.
package evmstaking

Expand Down Expand Up @@ -195,7 +194,7 @@ func (p EventProcessor) deliverDelegate(ctx context.Context, ev *bindings.Stakin
return errors.Wrap(err, "mint coins")
}

if err := p.bKeeper.SendCoinsFromModuleToAccount(ctx, ModuleName, delAddr, amountCoins); err != nil {
if err := p.bKeeper.SendCoinsFromModuleToAccountForReal(ctx, ModuleName, delAddr, amountCoins); err != nil {
return errors.Wrap(err, "send coins")
}

Expand Down
14 changes: 0 additions & 14 deletions halo/evmstaking2/testutil/mock_interfaces.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion halo/evmstaking2/types/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ type AuthKeeper interface {

type BankKeeper interface {
MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error
SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
SendCoinsFromModuleToAccountForReal(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
}

Expand Down
4 changes: 2 additions & 2 deletions halo/mybank/depinject.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
type DIInputs struct {
depinject.In

BankKeeper *bankkeeper.Keeper
BankKeeper bankkeeper.BaseKeeper
}

type DIOutputs struct {
Expand All @@ -19,7 +19,7 @@ type DIOutputs struct {

func DIProvide(input DIInputs) (DIOutputs, error) {
k := Keeper{
Keeper: *input.BankKeeper,
Keeper: input.BankKeeper,
}

return DIOutputs{
Expand Down
4 changes: 3 additions & 1 deletion halo/mybank/mybank.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Package evmupgrade monitors the Upgrade pre-deploy contract and converts
// its log events to cosmosSDK x/upgrade logic.
//
//nolint:wrapcheck // Wrapping not needed in this package.
package mybank

import (
Expand All @@ -20,7 +22,7 @@ type Keeper struct {
func (k Keeper) SendCoinsFromModuleToAccountForReal(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error {
log.Info(ctx, "Wrapped method called")

return k.SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt)
return k.Keeper.SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt)
}

func (Keeper) SendCoinsFromModuleToAccount(context.Context, string, sdk.AccAddress, sdk.Coins) error {
Expand Down

0 comments on commit c31a21b

Please sign in to comment.