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

@@ -74,7 +74,7 @@ pub fn parse_token(data: &[u8]) -> Result<TokenAccountType, ParseAccountError> {
}
#[derive(Debug, Serialize, Deserialize, PartialEq)]
#[serde(rename_all = "camelCase")]
#[serde(rename_all = "camelCase", tag = "type", content = "info")]
pub enum TokenAccountType {
Account(UiTokenAccount),
Mint(UiMint),