From 773f002980b24702ba3d79181055ad16b6b4de6e Mon Sep 17 00:00:00 2001 From: Stephen Akridge Date: Sat, 8 Aug 2020 12:17:26 -0700 Subject: [PATCH] Decode into binary64 --- client/src/rpc_client.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client/src/rpc_client.rs b/client/src/rpc_client.rs index fd0bc11ea148fe..134b528fdfb650 100644 --- a/client/src/rpc_client.rs +++ b/client/src/rpc_client.rs @@ -485,8 +485,14 @@ impl RpcClient { } let Response { context, - value: rpc_account, - } = serde_json::from_value::>>(result_json)?; + value: mut rpc_account, + } = serde_json::from_value::>>(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 {