-
Notifications
You must be signed in to change notification settings - Fork 332
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(sns): migrate SNS integration tests / init to sns-gov-api #3918
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this pull request affects the behavior of any canister owned by
the Governance team, remember to update the corresponding
unreleased_changes.md file(s).
To acknowldge this reminder (and unblock the PR), dismiss this
code review by going to the bottom of the pull request page, and
supply one of the following reasons:
-
Done.
-
No canister behavior changes.
7644804
to
7971a70
Compare
7971a70
to
92b2696
Compare
@@ -23,6 +23,7 @@ DEPENDENCIES = [ | |||
"//rs/nns/handlers/root/interface", | |||
"//rs/rust_canisters/http_types", | |||
"//rs/sns/governance", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you able to remove the old dependency?
@@ -45,6 +45,7 @@ BASE_DEPENDENCIES = [ | |||
"//rs/rust_canisters/dfn_protobuf", | |||
"//rs/rust_canisters/on_wire", | |||
"//rs/sns/governance", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question here
@@ -560,8 +560,7 @@ impl Neuron { | |||
/// that are adopted (then the fees are returned and not owed anymore) or | |||
/// by transferring funds to the neuron's account and then refreshing the stake. | |||
pub fn stake_e8s(&self) -> u64 { | |||
self.cached_neuron_stake_e8s | |||
.saturating_sub(self.neuron_fees_e8s) | |||
ic_sns_governance_api::pb::v1::Neuron::from(self.clone()).stake_e8s() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like you should have this implementation inside the domain model - not use the API version
Previously, the SNS integration tests and SNS init were using ic-sns-governance. They should be using ic-sns-governance-api. (That they are not using ic-sns-governance-api is a bug waiting to happen.)
Unfortunately this became a very viral change, so the diff is huge. It also involves a lot of code copying, which might not be the ideal approach.
I may close this PR and choose another route forward tomorrow