Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cosmos-sdk-rs: make staking amount non-nullable #124

Merged
merged 1 commit into from
Aug 25, 2021

Conversation

tony-iqlusion
Copy link
Member

As noted on #82, the amount field of MsgDelegate is annotated as non-nullable in the upstream cosmos-sdk:

https://github.com/cosmos/cosmos-sdk/blob/9fd866e3820b3510010ae172b682d71594cd8c14/proto/cosmos/staking/v1beta1/tx.proto#L89

message MsgDelegate {
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  string                   delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
  string                   validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""];
  cosmos.base.v1beta1.Coin amount            = 3 [(gogoproto.nullable) = false];
}

This commit changes the amount field of the domain type from Option<Coin> to Coin to reflect that.

As noted on #82, the `amount` field of `MsgDelegate` is annotated as
non-nullable in the upstream cosmos-sdk:

https://github.com/cosmos/cosmos-sdk/blob/9fd866e3820b3510010ae172b682d71594cd8c14/proto/cosmos/staking/v1beta1/tx.proto#L89

```proto
message MsgDelegate {
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  string                   delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
  string                   validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""];
  cosmos.base.v1beta1.Coin amount            = 3 [(gogoproto.nullable) = false];
}
```

This commit changes the `amount` field of the domain type from
`Option<Coin>` to `Coin` to reflect that.
@tony-iqlusion tony-iqlusion force-pushed the cosmos-sdk-rs/make-staking-amount-non-nullable branch from f125ad7 to 2d06f6a Compare August 25, 2021 00:44
@tony-iqlusion tony-iqlusion merged commit 7c85a49 into main Aug 25, 2021
@tony-iqlusion tony-iqlusion deleted the cosmos-sdk-rs/make-staking-amount-non-nullable branch August 25, 2021 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant