Minor cleanup and fixes for wallet send

This commit is contained in:
Ignotus Peverell
2017-06-06 13:18:16 -07:00
parent 3d5411b6ad
commit aeb3dfc0dd
6 changed files with 12 additions and 13 deletions
-1
View File
@@ -28,7 +28,6 @@ use rest::Error;
pub fn get<'a, T>(url: &'a str) -> Result<T, Error>
where for<'de> T: Deserialize<'de>
{
println!("get {}", url);
let client = hyper::Client::new();
let res = check_error(client.get(url).send())?;
serde_json::from_reader(res)
+3 -2
View File
@@ -74,9 +74,10 @@ impl ApiEndpoint for OutputApi {
fn get(&self, id: String) -> ApiResult<Output> {
debug!("GET output {}", id);
let c = util::from_hex(id.clone()).map_err(|e| Error::Argument(format!("Not a valid commitment: {}", id)))?;
self.chain_store
let out = self.chain_store
.get_output_by_commit(&Commitment::from_vec(c))
.map_err(|e| Error::Internal(e.to_string()))
.map_err(|e| Error::Internal(e.to_string()));
out
}
}