Return data in hex format
This commit is contained in:
parent
f010b95948
commit
2bf4a6e54c
@ -1,5 +1,5 @@
|
||||
use async_std::fs::{create_dir_all, read_dir, read_to_string, remove_file, File};
|
||||
use sdk_common::sp_client::bitcoin::hex::FromHex;
|
||||
use sdk_common::sp_client::bitcoin::hex::{DisplayHex, FromHex};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
||||
|
||||
@ -243,7 +243,7 @@ async fn handle_retrieve(req: Request<()>) -> tide::Result<Response> {
|
||||
|
||||
match retrieve_data(&key).await {
|
||||
Ok(value) => {
|
||||
let encoded_value = base64::encode(&value);
|
||||
let encoded_value = value.to_lower_hex_string();
|
||||
Ok(Response::builder(StatusCode::Ok)
|
||||
.body(serde_json::to_value(&RetrieveResponse {
|
||||
key,
|
||||
|
Loading…
x
Reference in New Issue
Block a user