Skip to content

Commit

Permalink
return SuccessResponse in rpc result
Browse files Browse the repository at this point in the history
  • Loading branch information
borngraced committed Jan 17, 2025
1 parent b02c3f4 commit 509ced8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions mm2src/mm2_main/src/lp_wallet.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use common::HttpStatusCode;
use common::{HttpStatusCode, SuccessResponse};
use crypto::{decrypt_mnemonic, encrypt_mnemonic, generate_mnemonic, CryptoCtx, CryptoInitError, EncryptedData,
MnemonicError};
use enum_derives::EnumFromStringify;
Expand Down Expand Up @@ -554,7 +554,7 @@ pub struct SeedPasswordUpdateResponse {
pub async fn update_seed_storage_password_rpc(
ctx: MmArc,
req: SeedPasswordUpdateRequest,
) -> MmResult<SeedPasswordUpdateResponse, WalletsStorageRpcError> {
) -> MmResult<SuccessResponse, WalletsStorageRpcError> {
let wallet_name = ctx
.wallet_name
.get()
Expand All @@ -571,10 +571,8 @@ pub async fn update_seed_storage_password_rpc(
))))?;
// encrypt mnemonic with new passphrase.
let encrypted_data = encrypt_mnemonic(&mnemonic, &req.new_password)?;
// save new encrypted mnemonic data with new password
// save new encrypted mnemonic data::default() with new password
save_encrypted_passphrase(&ctx, &wallet_name, &encrypted_data).await?;

Ok(SeedPasswordUpdateResponse {
result: "Success".to_string(),
})
Ok(SuccessResponse::default())
}

0 comments on commit 509ced8

Please sign in to comment.