Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aspect committed Dec 27, 2023
1 parent 0c68871 commit 9d3cf1a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 17 deletions.
2 changes: 0 additions & 2 deletions core/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ impl eframe::App for Core {
/// Called each time the UI needs repainting, which may be many times per second.
/// Put your widgets into a `SidePanel`, `TopPanel`, `CentralPanel`, `Window` or `Area`.
fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) {
// println!("update...");
for event in self.application_events_channel.iter() {
if let Err(err) = self.handle_events(event.clone(), ctx, frame) {
log_error!("error processing wallet runtime event: {}", err);
Expand Down Expand Up @@ -858,7 +857,6 @@ impl Core {
CoreWallet::Balance { balance, id } => {
if let Some(account_collection) = &self.account_collection {
if let Some(account) = account_collection.get(&id.into()) {
// println!("*** updating account balance: {}", id);
account.update_balance(balance)?;
} else {
log_error!("unable to find account {}", id);
Expand Down
2 changes: 1 addition & 1 deletion core/src/modules/account_manager/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ impl<'context> Processor<'context> {
}
Err(error) => {
println!();
println!("transaction error: {error}");
println!("Transaction error: {error}");
println!();
self.context.reset_send_state();
self.context.action = Action::Error(Arc::new(error));
Expand Down
2 changes: 0 additions & 2 deletions core/src/modules/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,10 @@ impl ModuleT for Import {
if let Some(result) = unlock_result.take() {
match result {
Ok(_) => {
println!("Unlock success");
// self.state = State::Unlock;
core.select::<modules::AccountManager>();
}
Err(err) => {
println!("Unlock error: {}", err);
self.state = State::Unlock(Some(err.to_string()));
}
}
Expand Down
2 changes: 0 additions & 2 deletions core/src/modules/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,6 @@ impl ModuleT for Metrics {
|| graph_range_from != core.settings.user_interface.metrics.graph_range_from
|| graph_range_to != core.settings.user_interface.metrics.graph_range_to
{

println!("graph_range_from: {} graph_range_to: {}", graph_range_from, graph_range_to);
core.settings.user_interface.metrics.graph_columns = graph_columns;
core.settings.user_interface.metrics.graph_height = graph_height;
core.settings.user_interface.metrics.graph_range_from = graph_range_from;
Expand Down
7 changes: 0 additions & 7 deletions core/src/runtime/services/kaspa/inproc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ impl InProc {
impl super::Kaspad for InProc {
async fn start(self: Arc<Self>, config: Config) -> Result<()> {
let args = Args::try_from(config)?;
println!("ARGS: {:#?}", args);

let fd_total_budget = fd_budget::limit()
- args.rpc_max_clients as i32
Expand All @@ -58,21 +57,15 @@ impl super::Kaspad for InProc {
async fn stop(self: Arc<Self>) -> Result<()> {
if let Some(mut inner) = self.inner.lock().unwrap().take() {
let (core, thread) = {
println!("*** TAKING RPC CORE SERVICE...");
let rpc_core_service = inner.rpc_core_service.take();
drop(rpc_core_service);
println!("*** RPC CORE SERVICE TAKEN...");
(inner.core, inner.thread)
};
println!("*** SHUTTING DOWN CORE...");
core.shutdown();
drop(core);
println!("*** CORE SHUT DOWN...");
println!("*** WAITING FOR THREAD TO JOIN...");
thread
.join()
.map_err(|_| Error::custom("kaspad inproc thread join failure"))?;
println!("*** THREAD JOINED...");
}
Ok(())
}
Expand Down
2 changes: 0 additions & 2 deletions core/src/utils/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ pub fn format_address(address: &Address, range: Option<usize>) -> String {
format_address_string(address, range)
}


pub fn format_partial_string(text: impl Into<String>, range: Option<usize>) -> String {
let text: String = text.into();
let range = range.unwrap_or(6);
Expand All @@ -55,7 +54,6 @@ pub fn format_partial_string(text: impl Into<String>, range: Option<usize>) -> S
}
}


/// SOMPI (u64) to KASPA (string) with suffix layout job generator
pub fn s2kws_layout_job(
enable: bool,
Expand Down
7 changes: 6 additions & 1 deletion core/src/utils/qr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ pub fn render_qrcode(text: &str, width: usize, height: usize) -> String {
.to_string()
}

pub fn render_qrcode_with_version(text: &str, width: usize, height: usize, version : Version) -> String {
pub fn render_qrcode_with_version(
text: &str,
width: usize,
height: usize,
version: Version,
) -> String {
let code = QrCode::with_version(text, version, EcLevel::L).unwrap();

code.render::<svg::Color<'_>>()
Expand Down

0 comments on commit 9d3cf1a

Please sign in to comment.