Skip to content
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

feat: allow wallet type from db to have preference #6245

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion applications/minotari_ledger_wallet/rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ imports_layout = "HorizontalVertical"
imports_granularity = "Crate"
match_block_trailing_comma = true
max_width = 120
newline_style = "Native"
newline_style = "Auto"
normalize_comments = true
overflow_delimited_expr = true
reorder_imports = true
Expand Down
3 changes: 1 addition & 2 deletions base_layer/wallet/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -774,12 +774,11 @@ pub fn read_or_create_wallet_type<T: WalletBackend + 'static>(
(None, None) => {
panic!("Something is very wrong, no wallet type was found in the DB, or provided (on first run)")
},
(Some(_), Some(_)) => panic!("Something is very wrong we have a wallet type from the DB and on first run"),
(None, Some(t)) => {
db.set_wallet_type(t)?;
Ok(t)
},
(Some(t), None) => Ok(t),
(Some(t), _) => Ok(t),
}
}

Expand Down
2 changes: 1 addition & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ imports_layout = "HorizontalVertical"
imports_granularity = "Crate"
match_block_trailing_comma = true
max_width = 120
newline_style = "Native"
newline_style = "Auto"
normalize_comments = true
overflow_delimited_expr = true
reorder_imports = true
Expand Down
Loading