fix(cfgtransformer): GroupSigners should be assigned in reverse order#216
Merged
gustavogama-cll merged 1 commit intoJan 28, 2025
Merged
Conversation
🦋 Changeset detectedLatest commit: fc73249 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
5102b15 to
ea70d40
Compare
2fb35b1 to
d10fb4c
Compare
4c89477 to
4b76811
Compare
The current ConfigTransformer.ToConfig implementation does not properly set nested `GroupSigner` attributes because it copies the group's reference before the attribute is assigned: ``` 1. group1.GroupSigners = append(group1.GroupSigners, group2) // appends copy of group2 2. group2.GroupSigners = ... // modifies original ``` This patch fixes the issue by processing groups in the reverse order; ``` 1. group2.GroupSigners = ... // modifies original 2. group1.GroupSigners = append(group1.GroupSigners, group2) // appends (modified)copy of group2 ```
4b76811 to
fc73249
Compare
|
Contributor
Author
|
@ecPablo, when you have a chance, could you take another look at this? |
ecPablo
approved these changes
Jan 28, 2025
Merged
friedemannf
pushed a commit
that referenced
this pull request
Jan 29, 2025
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @smartcontractkit/mcms@0.7.0 ### Minor Changes - [#255](#255) [`e38816f`](e38816f) Thanks [@ecPablo](https://github.com/ecPablo)! - Add config transformer functionality for solana. - [#257](#257) [`31f1e09`](31f1e09) Thanks [@akhilchainani](https://github.com/akhilchainani)! - Return generic transaction object instead of just hash ### Patch Changes - [#270](#270) [`d6d880c`](d6d880c) Thanks [@graham-chainlink](https://github.com/graham-chainlink)! - fix: incorporate timelock converter breaking api changes for scheduled operations - [#264](#264) [`8849c73`](8849c73) Thanks [@graham-chainlink](https://github.com/graham-chainlink)! - fix(executor): callproxy as config - [#216](#216) [`a481d17`](a481d17) Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! - Fix assignment of `GroupSigners` in `ConfigTransformer.ToConfig()` - [#268](#268) [`d28b0df`](d28b0df) Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! - Return the solana.rpc.GetTransactionResult struct as the raw transaction of the Solana SDK. Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




The current ConfigTransformer.ToConfig implementation does not properly set nested
GroupSignerattributes because it copies the group's reference before the attribute is assigned:This patch fixes the issue by processing groups in the reverse order: