func (k Keeper) SendCoinsFromModuleToAccount(
	ctx sdk.Context, senderModule string, recipient types.AccountID, amt Coins,
) error {
	senderAcc := k.GetModuleAccount(ctx, senderModule)
	if senderAcc == nil {
		panic(sdkerrors.Wrapf(sdkerrors.ErrUnknownAddress, "module account %s does not exist", senderModule))
	}
	if err := k.bk.SendCoinPower(ctx, senderAcc.GetID(), recipient, amt); err != nil {
		return sdkerrors.Wrapf(err,
			"SendCoinsFromModuleToAccount %s to %s by %s", senderAcc.String(), recipient.String(), amt.String())
	}
	return nil
}
SendCoinsFromModuleToAccount transfers coins from a ModuleAccount to an AccAddress.
It will panic if the module account does not exist.
package keeper
import (
	"fmt"
	stakingTypes "github.com/KuChainNetwork/kuchain/x/staking/types"
	"github.com/KuChainNetwork/kuchain/x/supply/types"
	sdk "github.com/cosmos/cosmos-sdk/types"
	sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)