From 00841631760241d58f89f433be7529cc705e2b02 Mon Sep 17 00:00:00 2001 From: Michael Mallan Date: Mon, 16 Sep 2024 15:04:09 +0100 Subject: [PATCH] gui: add help text for electrum address --- gui/src/app/view/settings.rs | 6 +++++- gui/src/installer/view.rs | 1 + gui/src/node/electrum.rs | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gui/src/app/view/settings.rs b/gui/src/app/view/settings.rs index c47748d0..cc5766c2 100644 --- a/gui/src/app/view/settings.rs +++ b/gui/src/app/view/settings.rs @@ -30,7 +30,10 @@ use crate::{ view::{hw, warning::warn}, }, hw::HardwareWallet, - node::bitcoind::{RpcAuthType, RpcAuthValues}, + node::{ + bitcoind::{RpcAuthType, RpcAuthValues}, + electrum, + }, }; pub fn list(cache: &Cache, is_remote_backend: bool) -> Element { @@ -591,6 +594,7 @@ pub fn electrum_edit<'a>( .size(P1_SIZE) .padding(5), ) + .push(text(electrum::ADDRESS_NOTES).size(P2_SIZE)) .spacing(5), ); diff --git a/gui/src/installer/view.rs b/gui/src/installer/view.rs index 31362a7f..d7479ca2 100644 --- a/gui/src/installer/view.rs +++ b/gui/src/installer/view.rs @@ -1382,6 +1382,7 @@ pub fn define_electrum<'a>(address: &form::Value) -> Element<'a, Message .size(text::P1_SIZE) .padding(10), ) + .push(text(electrum::ADDRESS_NOTES).size(text::P2_SIZE)) .spacing(10); Column::new().push(col_address).spacing(50).into() diff --git a/gui/src/node/electrum.rs b/gui/src/node/electrum.rs index 11ca4c39..89886f9a 100644 --- a/gui/src/node/electrum.rs +++ b/gui/src/node/electrum.rs @@ -5,6 +5,10 @@ pub enum ConfigField { Address, } +pub const ADDRESS_NOTES: &str = "Note: include \"ssl://\" as a prefix \ + for SSL connections. Be aware that self-signed \ + SSL certificates are currently not supported."; + impl fmt::Display for ConfigField { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self {