Skip to content

Commit

Permalink
add new params to struct and json transform
Browse files Browse the repository at this point in the history
  • Loading branch information
smk762 committed Oct 30, 2024
1 parent 195aca5 commit cfc9545
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/core/atomicdex/api/kdf/rpc_v1/rpc.electrum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ namespace atomic_dex::kdf
{
j["coin"] = cfg.coin_name;
j["tx_history"] = cfg.with_tx_history;
j["min_connected"] = 1;
j["max_connected"] = 3;

if (!cfg.servers.empty())
{
Expand Down Expand Up @@ -70,4 +72,4 @@ namespace atomic_dex::kdf
j.at("balance").get_to(cfg.balance);
j.at("result").get_to(cfg.result);
}
} // namespace atomic_dex::kdf
} // namespace atomic_dex::kdf
4 changes: 3 additions & 1 deletion src/core/atomicdex/api/kdf/rpc_v1/rpc.electrum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ namespace atomic_dex::kdf
std::optional<nlohmann::json> merge_params;
std::optional<std::vector<std::string>> bchd_urls;
std::optional<bool> allow_slp_unsafe_conf;
int min_connected{1};
int max_connected{3};
};

struct electrum_answer
Expand All @@ -59,4 +61,4 @@ namespace atomic_dex
{
using t_electrum_request = kdf::electrum_request;
using t_electrum_answer = kdf::electrum_answer;
} // namespace atomic_dex
} // namespace atomic_dex

0 comments on commit cfc9545

Please sign in to comment.