Fixup supply_with_commitment

This commit is contained in:
Michael Vines 2020-05-10 11:50:15 -07:00
parent 0541431ea8
commit 19722fceb3
1 changed files with 1 additions and 7 deletions

View File

@ -183,13 +183,7 @@ impl RpcClient {
&self,
commitment_config: CommitmentConfig,
) -> RpcResult<RpcSupply> {
let response = self
.client
.send(&RpcRequest::GetSupply, json!([commitment_config]), 0)
.map_err(|err| err.into_with_command("GetSupply"))?;
serde_json::from_value::<Response<RpcSupply>>(response)
.map_err(|err| ClientError::new_with_command(err.into(), "GetSupply"))
self.send(RpcRequest::GetSupply, json!([commitment_config]), 0)
}
pub fn total_supply(&self) -> ClientResult<u64> {