Skip to content

Commit

Permalink
Merge pull request #336 from terra-money/fix/withdraw-validator-commi…
Browse files Browse the repository at this point in the history
…ssion

fix: type of withdraw validator commission message
  • Loading branch information
Vritra4 authored Sep 6, 2022
2 parents 614ce3a + 60de465 commit cba121c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/Msg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export namespace Msg {
case 'cosmos-sdk/MsgWithdrawDelegationReward':
return MsgWithdrawDelegatorReward.fromAmino(data, isClassic);
case 'distribution/MsgWithdrawValidatorCommission':
case 'cosmos-sdk/MsgWithdrawValCommission':
case 'cosmos-sdk/MsgWithdrawValidatorCommission':
return MsgWithdrawValidatorCommission.fromAmino(data, isClassic);
case 'distribution/MsgFundCommunityPool':
case 'cosmos-sdk/MsgFundCommunityPool':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('MsgWithdrawValidatorCommission', () => {

it('deserialize amino', () => {
const fund = MsgWithdrawValidatorCommission.fromAmino({
type: 'cosmos-sdk/MsgWithdrawValCommission',
type: 'cosmos-sdk/MsgWithdrawValidatorCommission',
value: {
validator_address:
'terravaloper1pc0gs3n6803x7jqe9m7etegmyx29xw38aaf3u7',
Expand All @@ -27,7 +27,7 @@ describe('MsgWithdrawValidatorCommission', () => {
});

expect(fund.toAmino()).toMatchObject({
type: 'cosmos-sdk/MsgWithdrawValCommission',
type: 'cosmos-sdk/MsgWithdrawValidatorCommission',
value: {
validator_address:
'terravaloper1pc0gs3n6803x7jqe9m7etegmyx29xw38aaf3u7',
Expand Down
4 changes: 2 additions & 2 deletions src/core/distribution/msgs/MsgWithdrawValidatorCommission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class MsgWithdrawValidatorCommission extends JSONSerializable<
return {
type: isClassic
? 'distribution/MsgWithdrawValidatorCommission'
: 'cosmos-sdk/MsgWithdrawValCommission',
: 'cosmos-sdk/MsgWithdrawValidatorCommission',
value: {
validator_address,
},
Expand Down Expand Up @@ -101,7 +101,7 @@ export namespace MsgWithdrawValidatorCommission {
export interface Amino {
type:
| 'distribution/MsgWithdrawValidatorCommission'
| 'cosmos-sdk/MsgWithdrawValCommission';
| 'cosmos-sdk/MsgWithdrawValidatorCommission';
value: {
validator_address: ValAddress;
};
Expand Down

0 comments on commit cba121c

Please sign in to comment.