Skip to content

Commit

Permalink
feat: remove wallet type from config (#6357)
Browse files Browse the repository at this point in the history
Description
---
Remove wallet type from config.

Motivation and Context
---
This code is not used anymore, and if someone specifies anything in the
config, which should not happen, the wallet panics.

How Has This Been Tested?
---
System-level testing.

What process can a PR reviewer use to test or verify this change?
---
Code review.

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->
  • Loading branch information
hansieodendaal committed May 28, 2024
1 parent 28c7659 commit f927d69
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
4 changes: 0 additions & 4 deletions applications/minotari_console_wallet/src/init/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -831,10 +831,6 @@ pub fn prompt_wallet_type(
return Some(WalletType::default());
}

if wallet_config.wallet_type.is_some() {
return wallet_config.wallet_type.clone();
}

match boot_mode {
WalletBoot::New => {
#[cfg(not(feature = "ledger"))]
Expand Down
5 changes: 1 addition & 4 deletions base_layer/wallet/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use tari_common::{
configuration::{serializers, Network, StringList},
SubConfigPath,
};
use tari_common_types::{grpc_authentication::GrpcAuthentication, wallet_types::WalletType};
use tari_common_types::grpc_authentication::GrpcAuthentication;
use tari_comms::multiaddr::Multiaddr;
use tari_p2p::P2pConfig;
use tari_utilities::SafePassword;
Expand Down Expand Up @@ -118,8 +118,6 @@ pub struct WalletConfig {
pub use_libtor: bool,
/// A path to the file that stores the base node identity and secret key
pub identity_file: Option<PathBuf>,
/// The type of wallet software, or specific type of hardware
pub wallet_type: Option<WalletType>,
/// The cool down period between balance enquiry checks in seconds; requests faster than this will be ignored.
/// For specialized wallets processing many batch transactions this setting could be increased to 60 s to retain
/// responsiveness of the wallet with slightly delayed balance updates
Expand Down Expand Up @@ -163,7 +161,6 @@ impl Default for WalletConfig {
num_required_confirmations: 3,
use_libtor: true,
identity_file: None,
wallet_type: None,
balance_enquiry_cooldown_period: Duration::from_secs(5),
}
}
Expand Down

0 comments on commit f927d69

Please sign in to comment.