From e1e09713c93d6775eaf06e7b92b9cb36501d2240 Mon Sep 17 00:00:00 2001 From: Andre Popovitch Date: Mon, 14 Oct 2024 17:22:04 -0500 Subject: [PATCH] chore(sns): Add swap logs when changing controllership (#2027) This is to aid debugging in situations such as this one: https://forum.dfinity.org/t/dapp-canisters-control-not-returned/36125/5 --- rs/sns/swap/src/swap.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/rs/sns/swap/src/swap.rs b/rs/sns/swap/src/swap.rs index 2240a64b132..e24096fce1c 100644 --- a/rs/sns/swap/src/swap.rs +++ b/rs/sns/swap/src/swap.rs @@ -1413,7 +1413,10 @@ impl Swap { let result = self.restore_dapp_controllers(sns_root_client).await; match result { - Ok(result) => result.into(), + Ok(result) => { + log!(INFO, "Successfully restored dapp controllers, {:?}", result); + SetDappControllersCallResult::from(result) + } Err(err_message) => { log!(ERROR, "Halting set_dapp_controllers(), {:?}", err_message); SetDappControllersCallResult { possibility: None } @@ -1431,7 +1434,14 @@ impl Swap { .await; match result { - Ok(result) => result.into(), + Ok(result) => { + log!( + INFO, + "Successfully took sole control of dapp controllers, {:?}", + result + ); + SetDappControllersCallResult::from(result) + } Err(err_message) => { log!(ERROR, "Halting set_dapp_controllers(), {:?}", err_message); SetDappControllersCallResult { possibility: None }