Rework parsed account format (#11372)

* Rework parsed account format

* Serialize as type
This commit is contained in:
Tyera Eulberg
2020-08-05 00:59:10 -06:00
committed by GitHub
parent 9d4f9be1fe
commit 308186da79
6 changed files with 38 additions and 18 deletions

View File

@@ -21,7 +21,7 @@ pub fn parse_nonce(data: &[u8]) -> Result<UiNonceState, ParseAccountError> {
/// A duplicate representation of NonceState for pretty JSON serialization
#[derive(Debug, Serialize, Deserialize, PartialEq)]
#[serde(rename_all = "camelCase")]
#[serde(rename_all = "camelCase", tag = "type", content = "info")]
pub enum UiNonceState {
Uninitialized,
Initialized(UiNonceData),