Skip to content

Commit

Permalink
rename RegisterInterchainAccount api portID -> counterpartyPortID
Browse files Browse the repository at this point in the history
  • Loading branch information
damiannolan committed Oct 4, 2021
1 parent 9ca4672 commit 0389a8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/apps/27-interchain-accounts/keeper/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ func (k Keeper) InitInterchainAccount(ctx sdk.Context, connectionID, counterpart

// RegisterInterchainAccount attempts to create a new account using the provided address and stores it in state keyed by the provided port identifier
// If an account for the provided address already exists this function returns early (no-op)
func (k Keeper) RegisterInterchainAccount(ctx sdk.Context, accAddr sdk.AccAddress, portID string) {
func (k Keeper) RegisterInterchainAccount(ctx sdk.Context, accAddr sdk.AccAddress, counterpartyPortID string) {
if acc := k.accountKeeper.GetAccount(ctx, accAddr); acc != nil {
return
}

interchainAccount := types.NewInterchainAccount(
authtypes.NewBaseAccountWithAddress(accAddr),
portID,
counterpartyPortID,
)

k.accountKeeper.NewAccount(ctx, interchainAccount)
k.accountKeeper.SetAccount(ctx, interchainAccount)
k.SetInterchainAccountAddress(ctx, portID, interchainAccount.Address)
k.SetInterchainAccountAddress(ctx, counterpartyPortID, interchainAccount.Address)
}

0 comments on commit 0389a8b

Please sign in to comment.