diff --git a/CHANGELOG.md b/CHANGELOG.md index e59c6be9c12..04427790c1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,9 +50,15 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (cli) [\#9717](https://github.com/cosmos/cosmos-sdk/pull/9717) Added CLI flag `--output json/text` to `tx` cli commands. +<<<<<<< HEAD ### Bug Fixes * [\#9793](https://github.com/cosmos/cosmos-sdk/pull/9793) Fixed ECDSA/secp256r1 transaction malleability. +======= +* [\#9594](https://github.com/cosmos/cosmos-sdk/pull/9594) Remove legacy REST API. Please see the [REST Endpoints Migration guide](https://docs.cosmos.network/master/migrations/rest.html) to migrate to the new REST endpoints. +* [\#9781](https://github.com/cosmos/cosmos-sdk/pull/9781) Improve`withdraw-all-rewards` UX when broadcast mode `async` or `async` is used. +* [\#9785](https://github.com/cosmos/cosmos-sdk/issues/9785) Missing coin denomination in logs +>>>>>>> 18eea3a7c (fix: fixed missing coin denomination in msg server logs (#9786)) ### CLI Breaking Changes diff --git a/x/staking/client/testutil/suite.go b/x/staking/client/testutil/suite.go index f24a1ad5a23..5378d377433 100644 --- a/x/staking/client/testutil/suite.go +++ b/x/staking/client/testutil/suite.go @@ -206,6 +206,15 @@ func (s *IntegrationTestSuite) TestNewCreateValidatorCmd() { txResp := tc.respType.(*sdk.TxResponse) require.Equal(tc.expectedCode, txResp.Code, "test: %s, output\n:", tc.name, out.String()) + + events := txResp.Logs[0].GetEvents() + for i := 0; i < len(events); i++ { + if events[i].GetType() == "create_validator" { + attributes := events[i].GetAttributes() + require.Equal(attributes[1].Value, "100stake") + break + } + } } }) } diff --git a/x/staking/keeper/msg_server.go b/x/staking/keeper/msg_server.go index 30857c3a016..3642cef1e5a 100644 --- a/x/staking/keeper/msg_server.go +++ b/x/staking/keeper/msg_server.go @@ -110,7 +110,7 @@ func (k msgServer) CreateValidator(goCtx context.Context, msg *types.MsgCreateVa sdk.NewEvent( types.EventTypeCreateValidator, sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress), - sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Value.Amount.String()), + sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Value.String()), ), sdk.NewEvent( sdk.EventTypeMessage, @@ -231,7 +231,7 @@ func (k msgServer) Delegate(goCtx context.Context, msg *types.MsgDelegate) (*typ sdk.NewEvent( types.EventTypeDelegate, sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress), - sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Amount.Amount.String()), + sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Amount.String()), sdk.NewAttribute(types.AttributeKeyNewShares, newShares.String()), ), sdk.NewEvent( @@ -297,7 +297,7 @@ func (k msgServer) BeginRedelegate(goCtx context.Context, msg *types.MsgBeginRed types.EventTypeRedelegate, sdk.NewAttribute(types.AttributeKeySrcValidator, msg.ValidatorSrcAddress), sdk.NewAttribute(types.AttributeKeyDstValidator, msg.ValidatorDstAddress), - sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Amount.Amount.String()), + sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Amount.String()), sdk.NewAttribute(types.AttributeKeyCompletionTime, completionTime.Format(time.RFC3339)), ), sdk.NewEvent( @@ -358,7 +358,7 @@ func (k msgServer) Undelegate(goCtx context.Context, msg *types.MsgUndelegate) ( sdk.NewEvent( types.EventTypeUnbond, sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress), - sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Amount.Amount.String()), + sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Amount.String()), sdk.NewAttribute(types.AttributeKeyCompletionTime, completionTime.Format(time.RFC3339)), ), sdk.NewEvent(