Minor cleanup and fixes for wallet send
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user