@@ -88,6 +88,7 @@ pub enum CreateWalletSubCommand {
8888 /// Cannot specify a mnemonic or passphrase here, the mnemonic must have been entered on
8989 /// the device during its initial setup and the passphrase will have to be entered every
9090 /// time the device is connected to the host machine.
91+ #[ cfg( feature = "trezor" ) ]
9192 #[ command( ) ]
9293 Trezor {
9394 /// File path of the wallet file
@@ -107,6 +108,7 @@ pub enum CreateWalletSubCommand {
107108 /// Cannot specify a mnemonic or passphrase here, both are managed on the device.
108109 /// Depending on its configuration, the passphrase may need to be entered manually
109110 /// each time or may be applied automatically after unlocking with a secondary PIN.
111+ #[ cfg( feature = "ledger" ) ]
110112 #[ command( ) ]
111113 Ledger {
112114 /// File path of the wallet file
@@ -134,11 +136,13 @@ impl CreateWalletSubCommand {
134136 )
135137 }
136138
139+ #[ cfg( feature = "trezor" ) ]
137140 Self :: Trezor {
138141 wallet_path,
139142 device_id,
140143 } => ( wallet_path, WalletTypeArgs :: Trezor { device_id } ) ,
141144
145+ #[ cfg( feature = "ledger" ) ]
142146 Self :: Ledger { wallet_path } => ( wallet_path, WalletTypeArgs :: Ledger ) ,
143147 }
144148 }
@@ -177,6 +181,7 @@ pub enum RecoverWalletSubCommand {
177181 /// Cannot specify a mnemonic or passphrase here, the mnemonic must have been entered on
178182 /// the device during its initial setup and the passphrase will have to be entered every
179183 /// time the device is connected to the host machine.
184+ #[ cfg( feature = "trezor" ) ]
180185 #[ command( ) ]
181186 Trezor {
182187 /// File path of the wallet file
@@ -196,6 +201,7 @@ pub enum RecoverWalletSubCommand {
196201 /// Cannot specify a mnemonic or passphrase here, both are managed on the device.
197202 /// Depending on its configuration, the passphrase may need to be entered manually
198203 /// each time or may be applied automatically after unlocking with a secondary PIN.
204+ #[ cfg( feature = "ledger" ) ]
199205 #[ command( ) ]
200206 Ledger {
201207 /// File path of the wallet file
@@ -223,11 +229,13 @@ impl RecoverWalletSubCommand {
223229 )
224230 }
225231
232+ #[ cfg( feature = "trezor" ) ]
226233 Self :: Trezor {
227234 wallet_path,
228235 device_id,
229236 } => ( wallet_path, WalletTypeArgs :: Trezor { device_id } ) ,
230237
238+ #[ cfg( feature = "ledger" ) ]
231239 Self :: Ledger { wallet_path } => ( wallet_path, WalletTypeArgs :: Ledger ) ,
232240 }
233241 }
@@ -247,6 +255,7 @@ pub enum OpenWalletSubCommand {
247255 force_change_wallet_type : bool ,
248256 } ,
249257 /// (Beta) Open a wallet file that is connected to a Trezor hardware wallet.
258+ #[ cfg( feature = "trezor" ) ]
250259 #[ command( ) ]
251260 Trezor {
252261 /// File path of the wallet file
@@ -263,6 +272,7 @@ pub enum OpenWalletSubCommand {
263272 } ,
264273
265274 /// (Beta) Open a wallet file that is connected to a Ledger hardware wallet.
275+ #[ cfg( feature = "ledger" ) ]
266276 #[ command( ) ]
267277 Ledger {
268278 /// File path of the wallet file
@@ -1301,6 +1311,7 @@ pub trait ChoiceMenu: DynClone + Debug {
13011311}
13021312dyn_clone:: clone_trait_object!( ChoiceMenu ) ;
13031313
1314+ // TODO: this is Trezor-specific, so it should be either renamed or generalized.
13041315#[ derive( Debug , Clone ) ]
13051316pub struct CreateWalletDeviceSelectMenu {
13061317 available_devices : Vec < FoundDevice > ,
@@ -1354,6 +1365,7 @@ impl ChoiceMenu for CreateWalletDeviceSelectMenu {
13541365 }
13551366}
13561367
1368+ // TODO: this is Trezor-specific, so it should be either renamed or generalized.
13571369#[ derive( Debug , Clone ) ]
13581370pub struct OpenWalletDeviceSelectMenu {
13591371 available_devices : Vec < FoundDevice > ,
0 commit comments