wallet/ now only dev-depends on core/
This commit is contained in:
@ -12,7 +12,10 @@ edition = "2018"
|
||||
bincode = "1.1.2"
|
||||
bs58 = "0.2.0"
|
||||
log = "0.4.2"
|
||||
jsonrpc-core = "10.1.0"
|
||||
reqwest = "0.9.11"
|
||||
serde = "1.0.89"
|
||||
serde_derive = "1.0.88"
|
||||
serde_json = "1.0.39"
|
||||
solana-metrics = { path = "../metrics", version = "0.13.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.13.0" }
|
||||
|
@ -1,4 +1,8 @@
|
||||
pub mod client;
|
||||
pub mod rpc_mock;
|
||||
pub mod rpc_request;
|
||||
pub mod rpc_signature_status;
|
||||
pub mod thin_client;
|
||||
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
30
client/src/rpc_signature_status.rs
Normal file
30
client/src/rpc_signature_status.rs
Normal file
@ -0,0 +1,30 @@
|
||||
//! The `rpc_signature_status` module defines transaction status codes
|
||||
|
||||
use jsonrpc_core::{Error, Result};
|
||||
use std::str::FromStr;
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Serialize, Debug)]
|
||||
pub enum RpcSignatureStatus {
|
||||
AccountInUse,
|
||||
AccountLoadedTwice,
|
||||
Confirmed,
|
||||
GenericFailure,
|
||||
ProgramRuntimeError,
|
||||
SignatureNotFound,
|
||||
}
|
||||
|
||||
impl FromStr for RpcSignatureStatus {
|
||||
type Err = Error;
|
||||
|
||||
fn from_str(s: &str) -> Result<RpcSignatureStatus> {
|
||||
match s {
|
||||
"AccountInUse" => Ok(RpcSignatureStatus::AccountInUse),
|
||||
"AccountLoadedTwice" => Ok(RpcSignatureStatus::AccountLoadedTwice),
|
||||
"Confirmed" => Ok(RpcSignatureStatus::Confirmed),
|
||||
"GenericFailure" => Ok(RpcSignatureStatus::GenericFailure),
|
||||
"ProgramRuntimeError" => Ok(RpcSignatureStatus::ProgramRuntimeError),
|
||||
"SignatureNotFound" => Ok(RpcSignatureStatus::SignatureNotFound),
|
||||
_ => Err(Error::parse_error()),
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user