diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml deleted file mode 100644 index 3055f87..0000000 --- a/.github/workflows/typos.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Copied from https://github.com/rerun-io/rerun_template - -# https://github.com/crate-ci/typos -# Add exceptions to `.typos.toml` -# install and run locally: cargo install typos-cli && typos - -name: Spell Check -on: [pull_request] - -jobs: - run: - name: Spell Check - runs-on: ubuntu-latest - steps: - - name: Checkout Actions Repository - uses: actions/checkout@v4 - - - name: Check spelling of entire workspace - uses: crate-ci/typos@master diff --git a/src/helpers.rs b/src/helpers.rs index 590b11e..44518e7 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -75,19 +75,25 @@ pub async fn register_nym( sign_nym_request(&mut nym_request, trustee)?; // Submit the signed request to the ledger - println!( - "Submitting NYM request: {:?}", - nym_request.req_json.to_string() - ); + if cfg!(debug_assertions) { + println!( + "Submitting NYM request: {:?}", + nym_request.req_json.to_string() + ); + } let (request_result, _) = perform_ledger_request(pool, &nym_request, None).await?; match request_result { RequestResult::Reply(message) => { - println!("Reply: {:?}", message); + if cfg!(debug_assertions) { + println!("Reply: {:?}", message); + } Ok(message) } RequestResult::Failed(error) => { - println!("Error: {:?}", error); + if cfg!(debug_assertions) { + println!("Error: {:?}", error); + } Err(error) } } diff --git a/src/indorser.rs b/src/indorser.rs index c673e28..07e7b3f 100644 --- a/src/indorser.rs +++ b/src/indorser.rs @@ -43,7 +43,7 @@ pub fn endorser_tool( match signed_txn { Ok(txn) => { let unescaped_json = serde_json::to_string(&txn).unwrap(); - *signed_txn_result = Some(format!("{}", unescaped_json.clone())); + *signed_txn_result = Some(unescaped_json.clone().to_string()); } Err(e) => { *signed_txn_result = Some(format!("Error: {:?}", e)); @@ -73,15 +73,7 @@ pub fn endorser_tool( // } ui.separator(); ui.with_layout(egui::Layout::bottom_up(egui::Align::LEFT), |ui| { - powered_by_candy(ui); egui::warn_if_debug_build(ui); }); } } - -fn powered_by_candy(ui: &mut egui::Ui) { - ui.horizontal(|ui| { - ui.spacing_mut().item_spacing.x = 0.0; - ui.label("CANdy tooling"); - }); -}