From ff890c173c3447969f5c7bc2fc7505e154167c84 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Wed, 23 Sep 2020 11:11:56 -0700 Subject: [PATCH] RpcClient::get_multiple_accounts() now works --- 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 7677abf30d..1a1394739d 100644 --- a/client/src/rpc_client.rs +++ b/client/src/rpc_client.rs @@ -517,14 +517,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,