File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -302,19 +302,10 @@ impl Args {
302302
303303 if let Key :: Secret ( Secret :: SecureStore { entry_name } ) = identity {
304304 let entry = StellarEntry :: new ( & entry_name) ?;
305- match entry. delete_seed_phrase ( ) {
306- Ok ( ( ) ) => { }
307- Err ( e) => match e {
308- signer:: keyring:: Error :: Keyring ( keyring:: Error :: NoEntry ) => {
309- print. infoln ( "This key was already removed from the secure store. Removing the cli config file." ) ;
310- }
311- _ => {
312- return Err ( Error :: Keyring ( e) ) ;
313- }
314- } ,
315- }
305+ entry. delete_seed_phrase ( & print) ?;
316306 }
317307
308+ print. infoln ( "Removing the key's cli config file" ) ;
318309 KeyType :: Identity . remove ( name, & self . config_dir ( ) ?)
319310 }
320311
Original file line number Diff line number Diff line change @@ -66,9 +66,22 @@ impl StellarEntry {
6666 return Err ( Error :: FeatureNotEnabled ) ;
6767 }
6868
69- pub fn delete_seed_phrase ( & self ) -> Result < ( ) , Error > {
69+ pub fn delete_seed_phrase ( & self , print : & Print ) -> Result < ( ) , Error > {
7070 #[ cfg( feature = "additional-libs" ) ]
71- return Ok ( self . keyring . delete_credential ( ) ?) ;
71+ {
72+ match self . keyring . delete_credential ( ) {
73+ Ok ( ( ) ) => { }
74+ Err ( e) => match e {
75+ keyring:: Error :: NoEntry => {
76+ print. infoln ( "This key was already removed from the secure store." ) ;
77+ }
78+ _ => {
79+ return e // i think this still will be an issue in locator.rs
80+ }
81+ }
82+
83+ }
84+ }
7285
7386 return Err ( Error :: FeatureNotEnabled ) ;
7487 }
You can’t perform that action at this time.
0 commit comments