Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(sns_audit): Use the new API for reading the Neuron's Fund investment controller #4485

Merged
merged 1 commit into from
Mar 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions rs/sns/audit/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::collections::BTreeMap;

use candid::Principal;
use colored::{ColoredString, Colorize};
use ic_nervous_system_agent::{
Expand All @@ -14,6 +12,7 @@ use ic_nns_governance_api::pb::v1::{
use ic_sns_swap::pb::v1::sns_neuron_recipe::Investor;
use rgb::RGB8;
use rust_decimal::{prelude::FromPrimitive, Decimal};
use std::collections::BTreeMap;
use thiserror::Error;

#[derive(Debug, Error)]
Expand Down Expand Up @@ -157,8 +156,8 @@ pub async fn validate_sns_swap<C: CallCanisters>(
.unwrap()
.into_iter()
.filter_map(|recipe| {
if let Some(Investor::CommunityFund(ref investment)) = recipe.investor {
let controller = investment.try_get_controller().unwrap();
if let Some(Investor::CommunityFund(investment)) = recipe.investor {
let controller = investment.controller.unwrap();
let amount_sns_e8s = recipe.sns.unwrap().amount_e8s;
Some((controller, amount_sns_e8s))
} else {
Expand Down