@@ -232,8 +232,8 @@ pub trait Rpc {
232
232
#[ method( name = "walletcreate" ) ]
233
233
async fn wallet_create ( & self , name : & str ) -> Result < String , ErrorObjectOwned > ;
234
234
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 > ;
237
237
238
238
#[ method( name = "walletsendrequest" ) ]
239
239
async fn wallet_send_request (
@@ -505,7 +505,7 @@ impl WalletManager {
505
505
Ok ( mnemonic. to_string ( ) )
506
506
}
507
507
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 < ( ) > {
509
509
let start_block = self . get_wallet_start_block ( client) . await ?;
510
510
self . setup_new_wallet ( name. to_string ( ) , mnemonic. to_string ( ) , start_block) ?;
511
511
self . load_wallet ( name) . await ?;
@@ -927,9 +927,9 @@ impl RpcServer for RpcServerImpl {
927
927
} )
928
928
}
929
929
930
- async fn wallet_restore ( & self , name : & str , mnemonic : String ) -> Result < ( ) , ErrorObjectOwned > {
930
+ async fn wallet_recover ( & self , name : & str , mnemonic : String ) -> Result < ( ) , ErrorObjectOwned > {
931
931
self . wallet_manager
932
- . restore_wallet ( & self . client , name, & mnemonic)
932
+ . recover_wallet ( & self . client , name, & mnemonic)
933
933
. await
934
934
. map_err ( |error| {
935
935
ErrorObjectOwned :: owned ( RPC_WALLET_NOT_LOADED , error. to_string ( ) , None :: < String > )
0 commit comments