diff --git a/src/core/atomicdex/api/kdf/rpc_v2/rpc2.withdraw.cpp b/src/core/atomicdex/api/kdf/rpc_v2/rpc2.withdraw.cpp index d0a9d1a34..30d65e064 100644 --- a/src/core/atomicdex/api/kdf/rpc_v2/rpc2.withdraw.cpp +++ b/src/core/atomicdex/api/kdf/rpc_v2/rpc2.withdraw.cpp @@ -46,9 +46,12 @@ namespace atomic_dex::kdf obj["params"]["amount"] = cfg.amount; obj["params"]["to"] = cfg.to; obj["params"]["max"] = cfg.max; - if (cfg.memo.has_value()) + if (cfg.ibc_source_channel.has_value()) { - obj["params"]["ibc_source_channel"] = cfg.ibc_source_channel.value(); + if (cfg.ibc_source_channel.value() != "") + { + obj["params"]["ibc_source_channel"] = cfg.ibc_source_channel.value(); + } } if (cfg.memo.has_value()) { diff --git a/src/core/atomicdex/api/kdf/rpc_v2/rpc2.withdraw.hpp b/src/core/atomicdex/api/kdf/rpc_v2/rpc2.withdraw.hpp index d3e747b4c..4ff33b0eb 100644 --- a/src/core/atomicdex/api/kdf/rpc_v2/rpc2.withdraw.hpp +++ b/src/core/atomicdex/api/kdf/rpc_v2/rpc2.withdraw.hpp @@ -26,11 +26,11 @@ namespace atomic_dex::kdf struct withdraw_request { std::string coin; - std::string to; ///< coins will be withdraw to this address - std::string amount; ///< ignored if max is true - std::optional fees{std::nullopt}; ///< ignored if std::nullopt - std::optional memo; ///< memo for tendermint - std::optional ibc_source_channel; ///< ibc_source_channel for tendermint + std::string to; ///< coins will be withdraw to this address + std::string amount; ///< ignored if max is true + std::optional fees{std::nullopt}; ///< ignored if std::nullopt + std::optional memo{""}; ///< memo for tendermint + std::optional ibc_source_channel{""}; ///< ibc_source_channel for tendermint bool max{false}; };