From 0c4743df034fd30a1c2e1a196cf9726179325566 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 23 Sep 2020 21:58:23 +0000 Subject: [PATCH] RpcClient::get_multiple_accounts() now works (#12426) (cherry picked from commit ff890c173c3447969f5c7bc2fc7505e154167c84) Co-authored-by: Michael Vines --- client/src/rpc_client.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/rpc_client.rs b/client/src/rpc_client.rs index 943f88b271..c049aca996 100644 --- a/client/src/rpc_client.rs +++ b/client/src/rpc_client.rs @@ -522,14 +522,14 @@ impl RpcClient { data_slice: None, }; let pubkeys: Vec<_> = pubkeys.iter().map(|pubkey| pubkey.to_string()).collect(); - let response = self.send(RpcRequest::GetMultipleAccounts, json!([[pubkeys], config]))?; + let response = self.send(RpcRequest::GetMultipleAccounts, json!([pubkeys, config]))?; let Response { context, value: accounts, - } = serde_json::from_value::>>(response)?; + } = serde_json::from_value::>>>(response)?; let accounts: Vec> = accounts - .iter() - .map(|rpc_account| rpc_account.decode()) + .into_iter() + .map(|rpc_account| rpc_account.map(|a| a.decode()).flatten()) .collect(); Ok(Response { context,