Skip to content

Commit

Permalink
Decode into binary64
Browse files Browse the repository at this point in the history
  • Loading branch information
sakridge committed Aug 8, 2020
1 parent 7d79eb8 commit 773f002
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions client/src/rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,14 @@ impl RpcClient {
}
let Response {
context,
value: rpc_account,
} = serde_json::from_value::<Response<Option<UiAccount>>>(result_json)?;
value: mut rpc_account,
} = serde_json::from_value::<Response<Option<UiAccount>>>(result_json).expect("weird error");
use solana_account_decoder::UiAccountData::{Binary, Binary64};
if let Some(ref mut account) = rpc_account {
if let Binary(data) = &account.data {
account.data = Binary64(data.clone());
}
}
trace!("Response account {:?} {:?}", pubkey, rpc_account);
let account = rpc_account.and_then(|rpc_account| rpc_account.decode());
Ok(Response {
Expand Down

0 comments on commit 773f002

Please sign in to comment.