feat(x/bank): add origin address in event multisend (#21460)
This commit is contained in:
parent
43f59c8258
commit
33c463ec27
@ -1468,10 +1468,10 @@ func (suite *KeeperTestSuite) TestMsgMultiSendEvents() {
|
||||
event1.Attributes = append(
|
||||
event1.Attributes,
|
||||
coreevent.Attribute{Key: banktypes.AttributeKeyRecipient, Value: acc2StrAddr},
|
||||
coreevent.Attribute{Key: sdk.AttributeKeySender, Value: acc0StrAddr},
|
||||
coreevent.Attribute{Key: sdk.AttributeKeyAmount, Value: newCoins.String()},
|
||||
)
|
||||
event1.Attributes = append(
|
||||
event1.Attributes,
|
||||
coreevent.Attribute{Key: sdk.AttributeKeyAmount, Value: newCoins.String()})
|
||||
|
||||
event2 := coreevent.Event{
|
||||
Type: banktypes.EventTypeTransfer,
|
||||
Attributes: []coreevent.Attribute{},
|
||||
@ -1479,9 +1479,7 @@ func (suite *KeeperTestSuite) TestMsgMultiSendEvents() {
|
||||
event2.Attributes = append(
|
||||
event2.Attributes,
|
||||
coreevent.Attribute{Key: banktypes.AttributeKeyRecipient, Value: acc3StrAddr},
|
||||
)
|
||||
event2.Attributes = append(
|
||||
event2.Attributes,
|
||||
coreevent.Attribute{Key: sdk.AttributeKeySender, Value: acc0StrAddr},
|
||||
coreevent.Attribute{Key: sdk.AttributeKeyAmount, Value: newCoins2.String()},
|
||||
)
|
||||
// events are shifted due to the funding account events
|
||||
|
||||
@ -172,6 +172,7 @@ func (k BaseSendKeeper) InputOutputCoins(ctx context.Context, input types.Input,
|
||||
if err := k.EventService.EventManager(ctx).EmitKV(
|
||||
types.EventTypeTransfer,
|
||||
event.NewAttribute(types.AttributeKeyRecipient, out.Address),
|
||||
event.NewAttribute(types.AttributeKeySender, input.Address),
|
||||
event.NewAttribute(sdk.AttributeKeyAmount, out.Coins.String()),
|
||||
); err != nil {
|
||||
return err
|
||||
|
||||
Loading…
Reference in New Issue
Block a user