Skip to content

Commit

Permalink
fix(json_rpc): convert getUtxoInfo into non-sensitive method
Browse files Browse the repository at this point in the history
As input param `pkh` is mandatory.
  • Loading branch information
guidiaz committed Jan 13, 2025
1 parent 15d0e82 commit c2cb559
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions node/src/actors/json_rpc/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ pub fn attach_regular_methods<H>(
server.add_actix_method(system, "ranks", |params: Params| {
Box::pin(query_ranks(params.parse()))
});
server.add_actix_method(system, "getUtxoInfo", move |params: Params| {
Box::pin(get_utxo_info(params.parse()))
});
}

/// Attach the sensitive JSON-RPC methods to a multi-transport server.
Expand Down Expand Up @@ -198,14 +201,6 @@ pub fn attach_sensitive_methods<H>(
|_params| get_pkh(),
))
});
server.add_actix_method(system, "getUtxoInfo", move |params| {
Box::pin(if_authorized(
enable_sensitive_methods,
"getUtxoInfo",
params,
|params| get_utxo_info(params.parse()),
))
});
server.add_actix_method(system, "sign", move |params| {
Box::pin(if_authorized(
enable_sensitive_methods,
Expand Down

0 comments on commit c2cb559

Please sign in to comment.