mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-17 15:21:39 +02:00
committed by
Yeastplume
parent
47ee03cadd
commit
bff07eb3f5
@@ -29,7 +29,7 @@ tokio-retry = "0.1"
|
||||
uuid = { version = "0.7", features = ["serde", "v4"] }
|
||||
url = "1.7.0"
|
||||
chrono = { version = "0.4.4", features = ["serde"] }
|
||||
easy-jsonrpc = "0.4.1"
|
||||
easy-jsonrpc = "0.5.1"
|
||||
lazy_static = "1"
|
||||
|
||||
grin_wallet_util = { path = "../util", version = "1.1.0-beta.2" }
|
||||
|
||||
@@ -44,7 +44,7 @@ use uuid::Uuid;
|
||||
|
||||
use crate::apiwallet::{Foreign, ForeignRpc, Owner, OwnerRpc};
|
||||
use easy_jsonrpc;
|
||||
use easy_jsonrpc::Handler;
|
||||
use easy_jsonrpc::{Handler, MaybeReply};
|
||||
|
||||
lazy_static! {
|
||||
pub static ref GRIN_OWNER_BASIC_REALM: HeaderValue =
|
||||
@@ -687,10 +687,11 @@ where
|
||||
Box::new(parse_body(req).and_then(move |val: serde_json::Value| {
|
||||
let owner_api = &api as &dyn OwnerRpc;
|
||||
match owner_api.handle_request(val) {
|
||||
Some(r) => ok(r),
|
||||
None => {
|
||||
error!("OwnerAPI: call_api: failed with error");
|
||||
err(ErrorKind::GenericError(format!("OwnerAPI Call Failed")).into())
|
||||
MaybeReply::Reply(r) => ok(r),
|
||||
MaybeReply::DontReply => {
|
||||
// Since it's http, we need to return something. We return [] because jsonrpc
|
||||
// clients will parse it as an empty batch response.
|
||||
ok(serde_json::json!([]))
|
||||
}
|
||||
}
|
||||
}))
|
||||
@@ -866,10 +867,11 @@ where
|
||||
Box::new(parse_body(req).and_then(move |val: serde_json::Value| {
|
||||
let foreign_api = &api as &dyn ForeignRpc;
|
||||
match foreign_api.handle_request(val) {
|
||||
Some(r) => ok(r),
|
||||
None => {
|
||||
error!("ForeignAPI: call_api: failed with error");
|
||||
err(ErrorKind::GenericError(format!("ForeignAPI Call Failed")).into())
|
||||
MaybeReply::Reply(r) => ok(r),
|
||||
MaybeReply::DontReply => {
|
||||
// Since it's http, we need to return something. We return [] because jsonrpc
|
||||
// clients will parse it as an empty batch response.
|
||||
ok(serde_json::json!([]))
|
||||
}
|
||||
}
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user