-
Notifications
You must be signed in to change notification settings - Fork 99
Installer: let user choose derivation path #1705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
|
|
||
| pub mod template; | ||
|
|
||
| use iced::widget::{container, pick_list, scrollable, slider, Button, Space}; | ||
| use iced::widget::{self, container, pick_list, scrollable, slider, Button, Space}; | ||
| use iced::{Alignment, Length}; | ||
|
|
||
| use liana::miniscript::bitcoin::Network; | ||
|
|
@@ -353,6 +353,18 @@ pub fn edit_key_modal<'a>( | |
| duplicate_master_fg: bool, | ||
| ) -> Element<'a, Message> { | ||
| let xpub_valid = form_xpub.valid && !form_xpub.value.is_empty(); | ||
| let info = Column::new() | ||
| .push(Space::with_height(5)) | ||
| .push(widget::tooltip::Tooltip::new( | ||
| icon::tooltip_icon(), | ||
| "Switch account if you already use the same hardware in other configurations", | ||
| widget::tooltip::Position::Bottom, | ||
| )); | ||
| let source = Row::new() | ||
| .push(p1_regular("Select the source of your key").bold()) | ||
| .push(Space::with_width(10)) | ||
| .push(info) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I feel this tooltip would be more visible if it were next to the pick list within the HW card. Same applies for "Share Xpubs" below.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this have been request by @edouardparis previously and ACK'd by @nondiremanuel iirc |
||
| .push(Space::with_width(Length::Fill)); | ||
| let content = Column::new() | ||
| .padding(25) | ||
| .push_maybe(error.map(|e| card::error("Failed to import xpub", e.to_string()))) | ||
|
|
@@ -367,7 +379,7 @@ pub fn edit_key_modal<'a>( | |
| ) | ||
| .push( | ||
| Column::new() | ||
| .push(p1_regular("Select the source of your key")) | ||
| .push(source) | ||
| .spacing(10) | ||
| .push(Column::with_children(hws).spacing(10)) | ||
| .push(Column::with_children(keys).spacing(10)) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: added this assert to catch if an unhardened derivation path is used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I feel it might be slightly better to return an
OptionorResulthere and let the caller unwrap it.