diff --git a/x/opchild/types/expected_keepers.go b/x/opchild/types/expected_keepers.go index 2a5ef8ab..945850e1 100644 --- a/x/opchild/types/expected_keepers.go +++ b/x/opchild/types/expected_keepers.go @@ -13,6 +13,7 @@ type AccountKeeper interface { NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI IterateAccounts(ctx context.Context, process func(sdk.AccountI) (stop bool)) + NewAccount(ctx context.Context, acc sdk.AccountI) sdk.AccountI GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI // only used for simulation HasAccount(ctx context.Context, addr sdk.AccAddress) bool SetAccount(ctx context.Context, acc sdk.AccountI) diff --git a/x/ophost/keeper/msg_server.go b/x/ophost/keeper/msg_server.go index c3cee9a1..9c240a93 100644 --- a/x/ophost/keeper/msg_server.go +++ b/x/ophost/keeper/msg_server.go @@ -66,8 +66,8 @@ func (ms MsgServer) CreateBridge(ctx context.Context, req *types.MsgCreateBridge // create bridge account bridgeAcc := types.NewBridgeAccountWithAddress(types.BridgeAddress(bridgeId)) - bridgeAcc.AccountNumber = ms.authKeeper.NextAccountNumber(ctx) - ms.authKeeper.SetAccount(ctx, bridgeAcc) + bridgeAccI := (ms.authKeeper.NewAccount(ctx, bridgeAcc)) // set the account number + ms.authKeeper.SetAccount(ctx, bridgeAccI) sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent(sdk.NewEvent( types.EventTypeCreateBridge, diff --git a/x/ophost/types/expected_keeper.go b/x/ophost/types/expected_keeper.go index b6886b05..afe344a5 100644 --- a/x/ophost/types/expected_keeper.go +++ b/x/ophost/types/expected_keeper.go @@ -14,6 +14,7 @@ type AccountKeeper interface { NextAccountNumber(ctx context.Context) uint64 IterateAccounts(ctx context.Context, cb func(account sdk.AccountI) (stop bool)) + NewAccount(ctx context.Context, acc sdk.AccountI) sdk.AccountI GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI HasAccount(ctx context.Context, addr sdk.AccAddress) bool SetAccount(ctx context.Context, acc sdk.AccountI)