Ethanfrey/complete bank send event master (#6558)

Co-authored-by: Ethan Frey <ethanfrey@users.noreply.github.com>
This commit is contained in:
Marko 2020-07-01 09:25:35 +02:00 committed by GitHub
parent d5049413ef
commit 1b4fc78b4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -497,6 +497,10 @@ func (suite *IntegrationTestSuite) TestMsgSendEvents() {
event1.Attributes, event1.Attributes,
tmkv.Pair{Key: []byte(types.AttributeKeyRecipient), Value: []byte(addr2.String())}, tmkv.Pair{Key: []byte(types.AttributeKeyRecipient), Value: []byte(addr2.String())},
) )
event1.Attributes = append(
event1.Attributes,
tmkv.Pair{Key: []byte(types.AttributeKeySender), Value: []byte(addr.String())},
)
event1.Attributes = append( event1.Attributes = append(
event1.Attributes, event1.Attributes,
tmkv.Pair{Key: []byte(sdk.AttributeKeyAmount), Value: []byte(newCoins.String())}, tmkv.Pair{Key: []byte(sdk.AttributeKeyAmount), Value: []byte(newCoins.String())},

View File

@ -119,6 +119,7 @@ func (k BaseSendKeeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAd
sdk.NewEvent( sdk.NewEvent(
types.EventTypeTransfer, types.EventTypeTransfer,
sdk.NewAttribute(types.AttributeKeyRecipient, toAddr.String()), sdk.NewAttribute(types.AttributeKeyRecipient, toAddr.String()),
sdk.NewAttribute(types.AttributeKeySender, fromAddr.String()),
sdk.NewAttribute(sdk.AttributeKeyAmount, amt.String()), sdk.NewAttribute(sdk.AttributeKeyAmount, amt.String()),
), ),
sdk.NewEvent( sdk.NewEvent(