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

fix: fix Tor ID deserialization issue #3950

Merged
merged 3 commits into from
Mar 24, 2022
Merged
Changes from 1 commit
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
17 changes: 13 additions & 4 deletions applications/tari_console_wallet/src/init/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,19 @@ pub async fn init_wallet(
}

let transport_type = create_transport_type(config);
let transport_type = match transport_type {
Tor(mut tor_config) => {
tor_config.identity = wallet_db.get_tor_id().await?.map(Box::new);
Tor(tor_config)
let transport_type = match transport_type.clone() {
Tor(mut tor_config) => match wallet_db.get_tor_id().await {
Ok(identity) => {
tor_config.identity = identity.map(Box::new);
Tor(tor_config)
},
Err(e) => {
warn!(
target: LOG_TARGET,
"Error reading stored Tor Identity, using default: {}", e
);
transport_type
},
},
_ => transport_type,
};
Expand Down