Deprecate account management (#10213)
* Extract accounts from ethcore. * Fix ethcore. * Get rid of AccountProvider in test_helpers * Fix rest of the code. * Re-use EngineSigner, fix tests. * Simplify EngineSigner to always have an Address. * Fix RPC tests. * Add deprecation notice to RPCs. * Feature to disable accounts. * extract accounts in RPC * Run with accounts in tests. * Fix RPC compilation and tests. * Fix compilation of the binary. * Fix compilation of the binary. * Fix compilation with accounts enabled. * Fix tests. * Update submodule. * Remove android. * Use derive for Default * Don't build secretstore by default. * Add link to issue. * Refresh Cargo.lock. * Fix miner tests. * Update rpc/Cargo.toml Co-Authored-By: tomusdrw <tomusdrw@users.noreply.github.com> * Fix private tests.
This commit is contained in:
committed by
Afri Schoedon
parent
8fa56add47
commit
d5c19f8719
@@ -18,7 +18,6 @@
|
||||
|
||||
use std::fmt;
|
||||
|
||||
use ethcore::account_provider::SignError as AccountError;
|
||||
use ethcore::error::{Error as EthcoreError, ErrorKind, CallError};
|
||||
use ethcore::client::BlockId;
|
||||
use jsonrpc_core::{futures, Result as RpcResult, Error, ErrorCode, Value};
|
||||
@@ -337,14 +336,6 @@ pub fn fetch<T: fmt::Debug>(error: T) -> Error {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn signing(error: AccountError) -> Error {
|
||||
Error {
|
||||
code: ErrorCode::ServerError(codes::ACCOUNT_LOCKED),
|
||||
message: "Your account is locked. Unlock the account via CLI, personal_unlockAccount or use Trusted Signer.".into(),
|
||||
data: Some(Value::String(format!("{:?}", error))),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn invalid_call_data<T: fmt::Display>(error: T) -> Error {
|
||||
Error {
|
||||
code: ErrorCode::ServerError(codes::ENCODING_ERROR),
|
||||
@@ -353,7 +344,17 @@ pub fn invalid_call_data<T: fmt::Display>(error: T) -> Error {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn password(error: AccountError) -> Error {
|
||||
#[cfg(any(test, feature = "accounts"))]
|
||||
pub fn signing(error: ::accounts::SignError) -> Error {
|
||||
Error {
|
||||
code: ErrorCode::ServerError(codes::ACCOUNT_LOCKED),
|
||||
message: "Your account is locked. Unlock the account via CLI, personal_unlockAccount or use Trusted Signer.".into(),
|
||||
data: Some(Value::String(format!("{:?}", error))),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "accounts"))]
|
||||
pub fn password(error: ::accounts::SignError) -> Error {
|
||||
Error {
|
||||
code: ErrorCode::ServerError(codes::PASSWORD_INVALID),
|
||||
message: "Account password is invalid or account does not exist.".into(),
|
||||
|
||||
Reference in New Issue
Block a user