Skip to content

Commit

Permalink
Fix client generation with param_kind = map (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
vorot93 authored Jun 23, 2022
1 parent 18a4449 commit 610f635
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proc-macros/src/render_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ impl RpcDescription {
});
match param_kind {
ParamKind::Map => {
let jsonrpsee = self.jsonrpsee_client_path.as_ref().unwrap();
// Extract parameter names.
let param_names = extract_param_names(&signature.sig);
// Combine parameter names and values into tuples.
Expand All @@ -165,7 +166,7 @@ impl RpcDescription {
quote! { (#param, #value) }
});
quote! {
Some(types::ParamsSer::Map(
Some(#jsonrpsee::types::ParamsSer::Map(
std::collections::BTreeMap::<&str, #serde_json::Value>::from(
[#(#params),*]
)
Expand Down

0 comments on commit 610f635

Please sign in to comment.