@@ -232,8 +232,8 @@ pub trait Rpc {
232232 #[ method( name = "walletcreate" ) ]
233233 async fn wallet_create ( & self , name : & str ) -> Result < String , ErrorObjectOwned > ;
234234
235- #[ method( name = "walletrestore " ) ]
236- async fn wallet_restore ( & self , name : & str , mnemonic : String ) -> Result < ( ) , ErrorObjectOwned > ;
235+ #[ method( name = "walletrecover " ) ]
236+ async fn wallet_recover ( & self , name : & str , mnemonic : String ) -> Result < ( ) , ErrorObjectOwned > ;
237237
238238 #[ method( name = "walletsendrequest" ) ]
239239 async fn wallet_send_request (
@@ -505,7 +505,7 @@ impl WalletManager {
505505 Ok ( mnemonic. to_string ( ) )
506506 }
507507
508- pub async fn restore_wallet ( & self , client : & reqwest:: Client , name : & str , mnemonic : & str ) -> anyhow:: Result < ( ) > {
508+ pub async fn recover_wallet ( & self , client : & reqwest:: Client , name : & str , mnemonic : & str ) -> anyhow:: Result < ( ) > {
509509 let start_block = self . get_wallet_start_block ( client) . await ?;
510510 self . setup_new_wallet ( name. to_string ( ) , mnemonic. to_string ( ) , start_block) ?;
511511 self . load_wallet ( name) . await ?;
@@ -927,9 +927,9 @@ impl RpcServer for RpcServerImpl {
927927 } )
928928 }
929929
930- async fn wallet_restore ( & self , name : & str , mnemonic : String ) -> Result < ( ) , ErrorObjectOwned > {
930+ async fn wallet_recover ( & self , name : & str , mnemonic : String ) -> Result < ( ) , ErrorObjectOwned > {
931931 self . wallet_manager
932- . restore_wallet ( & self . client , name, & mnemonic)
932+ . recover_wallet ( & self . client , name, & mnemonic)
933933 . await
934934 . map_err ( |error| {
935935 ErrorObjectOwned :: owned ( RPC_WALLET_NOT_LOADED , error. to_string ( ) , None :: < String > )
0 commit comments