Skip to content

Commit

Permalink
remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
borngraced committed Jan 10, 2025
1 parent 6d798a8 commit a34ac6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion mm2src/mm2_main/src/lp_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ impl From<ReadPassphraseError> for WalletsStorageRpcError {
/// A `Result` type containing:
///
/// * [`Ok`]([`GetMnemonicResponse`]) - The wallet mnemonic in the requested format.
/// * [`MmError`]<[`WalletsStorageRpcError>`]> - Returns specific [`GetMnemonicError`] variants for different failure scenarios.
/// * [`MmError`]<[`WalletsStorageRpcError>`]> - Returns specific [`WalletsStorageRpcError`] variants for different failure scenarios.
///
/// # Errors
///
Expand Down
13 changes: 2 additions & 11 deletions mm2src/mm2_main/src/lp_wallet/mnemonics_storage.rs
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
use crypto::{EncryptedData, MnemonicError};
use enum_derives::EnumFromStringify;
use crypto::EncryptedData;
use mm2_core::mm_ctx::MmArc;
use mm2_err_handle::prelude::*;
use mm2_io::fs::{ensure_file_is_writable, list_files_by_extension};

use super::ReadPassphraseError;

type WalletsStorageResult<T> = Result<T, MmError<WalletsStorageError>>;

#[derive(Debug, Deserialize, Display, Serialize, EnumFromStringify)]
#[derive(Debug, Deserialize, Display, Serialize)]
pub enum WalletsStorageError {
#[display(fmt = "Error writing to file: {}", _0)]
FsWriteError(String),
#[display(fmt = "Error reading from file: {}", _0)]
FsReadError(String),
#[display(fmt = "Internal error: {}", _0)]
Internal(String),
#[display(fmt = "Mnemonic error: {}", _0)]
#[from_stringify("MnemonicError")]
MnemonicError(String),
#[display(fmt = "Read Passphrase error: {}", _0)]
#[from_stringify("ReadPassphraseError")]
ReadPassphraseError(String),
}

/// Saves the passphrase to a file associated with the given wallet name.
Expand Down

0 comments on commit a34ac6b

Please sign in to comment.