Revert "Add UiTransactionEncoding::Raw"
This reverts commit a4a5438b6d
.
This commit is contained in:
parent
edf2b1ee85
commit
1437660686
|
@ -173,10 +173,9 @@ pub struct TransactionWithStatusMeta {
|
||||||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
|
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub enum UiTransactionEncoding {
|
pub enum UiTransactionEncoding {
|
||||||
Binary, // base58 encoded raw transaction
|
Binary,
|
||||||
Json,
|
Json,
|
||||||
JsonParsed,
|
JsonParsed,
|
||||||
Raw,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
@ -184,7 +183,6 @@ pub enum UiTransactionEncoding {
|
||||||
pub enum EncodedTransaction {
|
pub enum EncodedTransaction {
|
||||||
Binary(String),
|
Binary(String),
|
||||||
Json(UiTransaction),
|
Json(UiTransaction),
|
||||||
Raw(Transaction),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EncodedTransaction {
|
impl EncodedTransaction {
|
||||||
|
@ -193,7 +191,6 @@ impl EncodedTransaction {
|
||||||
UiTransactionEncoding::Binary => EncodedTransaction::Binary(
|
UiTransactionEncoding::Binary => EncodedTransaction::Binary(
|
||||||
bs58::encode(bincode::serialize(&transaction).unwrap()).into_string(),
|
bs58::encode(bincode::serialize(&transaction).unwrap()).into_string(),
|
||||||
),
|
),
|
||||||
UiTransactionEncoding::Raw => EncodedTransaction::Raw(transaction),
|
|
||||||
_ => {
|
_ => {
|
||||||
let message = if encoding == UiTransactionEncoding::Json {
|
let message = if encoding == UiTransactionEncoding::Json {
|
||||||
UiMessage::Raw(UiRawMessage {
|
UiMessage::Raw(UiRawMessage {
|
||||||
|
@ -250,7 +247,6 @@ impl EncodedTransaction {
|
||||||
.into_vec()
|
.into_vec()
|
||||||
.ok()
|
.ok()
|
||||||
.and_then(|bytes| bincode::deserialize(&bytes).ok()),
|
.and_then(|bytes| bincode::deserialize(&bytes).ok()),
|
||||||
EncodedTransaction::Raw(transaction) => Some(transaction.clone()),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue