diff --git a/core/src/device.rs b/core/src/device.rs index 6d6417d..04a0702 100644 --- a/core/src/device.rs +++ b/core/src/device.rs @@ -30,7 +30,7 @@ impl Device { pub fn set_screen_size(&mut self, rect: &Rect) { let size = rect.size(); - if size.x < size.y || size.x < 540.0 { + if size.x * 3. < size.y * 2. || size.x < 540.0 { self.orientation = Orientation::Portrait; } else { self.orientation = Orientation::Landscape; diff --git a/core/src/egui/easy_mark/mod.rs b/core/src/egui/easy_mark/mod.rs index 6c80f9b..c2b995f 100644 --- a/core/src/egui/easy_mark/mod.rs +++ b/core/src/egui/easy_mark/mod.rs @@ -4,5 +4,5 @@ pub mod easy_mark_parser; mod easy_mark_viewer; -pub use easy_mark_parser as parser; +// pub use easy_mark_parser as parser; pub use easy_mark_viewer::easy_mark; diff --git a/core/src/egui/icon.rs b/core/src/egui/icon.rs index df7e7dc..ee12b21 100644 --- a/core/src/egui/icon.rs +++ b/core/src/egui/icon.rs @@ -1,5 +1,4 @@ use crate::imports::*; -pub use egui_phosphor::*; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct IconSize { diff --git a/core/src/modules/account_manager/processor.rs b/core/src/modules/account_manager/processor.rs index b84f0ed..2249ab1 100644 --- a/core/src/modules/account_manager/processor.rs +++ b/core/src/modules/account_manager/processor.rs @@ -89,8 +89,8 @@ impl<'context> Processor<'context> { self.context.priority_fees_sompi } else { 0 }; - let wallet_secret = Secret::try_from(self.context.wallet_secret.clone()).expect("expecting wallet secret"); - let payment_secret = account.requires_bip39_passphrase(core).then_some(Secret::try_from(self.context.payment_secret.clone()).expect("expecting payment secret")); + let wallet_secret = Secret::from(self.context.wallet_secret.clone()); + let payment_secret = account.requires_bip39_passphrase(core).then_some(Secret::from(self.context.payment_secret.clone())); match self.context.transaction_kind.unwrap() { TransactionKind::Send => { diff --git a/core/src/modules/settings/mod.rs b/core/src/modules/settings/mod.rs index d3bd01c..fdcf861 100644 --- a/core/src/modules/settings/mod.rs +++ b/core/src/modules/settings/mod.rs @@ -24,7 +24,7 @@ impl Settings { pub fn load(&mut self, settings : crate::settings::Settings) { self.settings = settings; - self.grpc_network_interface = NetworkInterfaceEditor::try_from(&self.settings.node.grpc_network_interface).unwrap(); + self.grpc_network_interface = NetworkInterfaceEditor::from(&self.settings.node.grpc_network_interface); } } @@ -329,7 +329,7 @@ impl Settings { }, Confirm::Nack => { self.settings = core.settings.clone(); - self.grpc_network_interface = NetworkInterfaceEditor::try_from(&self.settings.node.grpc_network_interface).unwrap(); + self.grpc_network_interface = NetworkInterfaceEditor::from(&self.settings.node.grpc_network_interface); } } }