Skip to content

Commit

Permalink
fix(x/tx): recursively traverse nested messages in GetSigners (cosmos…
Browse files Browse the repository at this point in the history
  • Loading branch information
kocubinski authored Dec 18, 2023
1 parent 1a49605 commit 0c05898
Show file tree
Hide file tree
Showing 5 changed files with 4,121 additions and 375 deletions.
5 changes: 4 additions & 1 deletion x/tx/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## [Unreleased]
## v0.13.0

### Improvements
* [#18740](https://github.com/cosmos/cosmos-sdk/pull/18740) Support nested messages when fetching signers up to a default depth of 32.

## v0.12.0

Expand Down
36 changes: 36 additions & 0 deletions x/tx/internal/testpb/signers.proto
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,42 @@ message RepeatedNestedRepeatedSigner {
}
}

message DeeplyNestedSigner {
option (cosmos.msg.v1.signer) = "inner_one";
InnerOne inner_one = 1;

message InnerOne {
option (cosmos.msg.v1.signer) = "inner_two";
InnerTwo inner_two = 1;

message InnerTwo {
option (cosmos.msg.v1.signer) = "signer";
string signer = 1;
}
}
}

message DeeplyNestedRepeatedSigner {
option (cosmos.msg.v1.signer) = "inner";
repeated Inner inner = 1;

message Inner {
option (cosmos.msg.v1.signer) = "inner";
repeated Inner inner = 1;

message Inner {
option (cosmos.msg.v1.signer) = "inner";
repeated Bottom inner = 1;

message Bottom {
option (cosmos.msg.v1.signer) = "signer";
repeated string signer = 1;
}
}
}
}


message BadSigner {
option (cosmos.msg.v1.signer) = "signer";
bytes signer = 1;
Expand Down
Loading

0 comments on commit 0c05898

Please sign in to comment.