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

refactor(toolbox): addAggregator immutable args #1195

Merged
merged 3 commits into from
Oct 17, 2023

Conversation

alexandre-abrioux
Copy link
Member

Description of the changes

This is a follow-up to @olivier7delf 's comment (here) on #1134

This makes the args immutable (replaced let by const) and variable manipulations a bit clearer.

await runUpdate('updateAggregator', [input, output, aggregator], args);
assert(aggregatorAddress);

await runUpdate('updateAggregator', [inputAddress, outputAddress, aggregatorAddress], args);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's now easier to understand what we are passing by to the next function: addresses.

let { input, output, aggregator } = args;
const { input, output, aggregator: aggregatorArg } = args;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main change

Co-authored-by: MantisClone <david.huntmateo@request.network>
Copy link
Contributor

@olivier7delf olivier7delf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is straightforward now! :)

@alexandre-abrioux alexandre-abrioux enabled auto-merge (squash) October 17, 2023 08:53
@alexandre-abrioux alexandre-abrioux merged commit 9414820 into master Oct 17, 2023
26 checks passed
@alexandre-abrioux alexandre-abrioux deleted the refacto-addaggregator branch October 17, 2023 09:00
@coveralls
Copy link

Coverage Status

coverage: 87.383%. remained the same when pulling 0ce4d1d on refacto-addaggregator into d940150 on master.

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.

7 participants