Skip to content

Commit

Permalink
chore(sns): Add swap logs when changing controllership (#2027)
Browse files Browse the repository at this point in the history
This is to aid debugging in situations such as this one:
https://forum.dfinity.org/t/dapp-canisters-control-not-returned/36125/5
  • Loading branch information
anchpop authored Oct 14, 2024
1 parent f1564ab commit e1e0971
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions rs/sns/swap/src/swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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 }
Expand Down

0 comments on commit e1e0971

Please sign in to comment.