diff --git a/CHANGELOG.md b/CHANGELOG.md index 71d574731d46..5e8f64b8d35a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -131,6 +131,7 @@ is the latest height, we'll use the store's `lastCommitInfo`. Otherwise, we fetc ### State Machine Breaking +* (x/bank) [\#6283](https://github.com/cosmos/cosmos-sdk/pull/6283) Create account if recipient does not exist on handing `MsgMultiSend`. * (genesis) [\#5506](https://github.com/cosmos/cosmos-sdk/pull/5506) The `x/distribution` genesis state now includes `params` instead of individual parameters. * (genesis) [\#5017](https://github.com/cosmos/cosmos-sdk/pull/5017) The `x/genaccounts` module has been @@ -352,7 +353,7 @@ to detail this new feature and how state transitions occur. now exists a single `Params` type with a getter and setter along with a getter for each individual parameter. ### Bug Fixes - +* (x/bank) [\#6283](https://github.com/cosmos/cosmos-sdk/pull/6283) Create account if recipient does not exist on handing `MsgMultiSend`. * (rest) [\#5508](https://github.com/cosmos/cosmos-sdk/pull/5508) Fix `x/distribution` endpoints to properly return height in the response. * (x/genutil) [\#5499](https://github.com/cosmos/cosmos-sdk/pull/) Ensure `DefaultGenesis` returns valid and non-nil default genesis state. * (client) [\#5303](https://github.com/cosmos/cosmos-sdk/issues/5303) Fix ignored error in tx generate only mode. diff --git a/x/bank/internal/keeper/keeper.go b/x/bank/internal/keeper/keeper.go index 8e5f5faa5c8d..5f0dfed2b221 100644 --- a/x/bank/internal/keeper/keeper.go +++ b/x/bank/internal/keeper/keeper.go @@ -211,6 +211,15 @@ func (keeper BaseSendKeeper) InputOutputCoins(ctx sdk.Context, inputs []types.In sdk.NewAttribute(sdk.AttributeKeyAmount, out.Coins.String()), ), ) + + // Create account if recipient does not exist. + // + // NOTE: This should ultimately be removed in favor a more flexible approach + // such as delegated fee messages. + acc := keeper.ak.GetAccount(ctx, out.Address) + if acc == nil { + keeper.ak.SetAccount(ctx, keeper.ak.NewAccountWithAddress(ctx, out.Address)) + } } return nil