From cdd7ba1528165c39b67cd723a19313dd3fe9758b Mon Sep 17 00:00:00 2001 From: techgoku Date: Tue, 17 Jan 2023 19:04:18 +0530 Subject: [PATCH] flash method handled for client --- src/lws/src/rest_server.cpp | 5 +++-- src/lws/src/rpc/light_wallet.cpp | 2 +- src/lws/src/rpc/light_wallet.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lws/src/rest_server.cpp b/src/lws/src/rest_server.cpp index 60e2f68460f..a8f57c881dc 100644 --- a/src/lws/src/rest_server.cpp +++ b/src/lws/src/rest_server.cpp @@ -713,8 +713,9 @@ namespace lws transaction_rpc::request daemon_req{}; daemon_req.do_not_relay = false; - daemon_req.tx_as_hex = std::move(req.tx); - if(req.flash == true){ + daemon_req.tx_as_hex = std::move(req.tx); + if(req.fee == "5") + { daemon_req.flash = true; }else{ daemon_req.flash =false; diff --git a/src/lws/src/rpc/light_wallet.cpp b/src/lws/src/rpc/light_wallet.cpp index 852ac4629c6..56fee2fe14a 100644 --- a/src/lws/src/rpc/light_wallet.cpp +++ b/src/lws/src/rpc/light_wallet.cpp @@ -311,7 +311,7 @@ namespace lws void rpc::read_bytes(wire::json_reader& source, submit_raw_tx_request& self) { wire::object(source, WIRE_FIELD(tx), - WIRE_OPTIONAL_FIELD(flash) + WIRE_FIELD(fee) ); } void rpc::write_bytes(wire::json_writer& dest, const submit_raw_tx_response self) diff --git a/src/lws/src/rpc/light_wallet.h b/src/lws/src/rpc/light_wallet.h index 392408892d8..8455916f2a3 100644 --- a/src/lws/src/rpc/light_wallet.h +++ b/src/lws/src/rpc/light_wallet.h @@ -170,7 +170,7 @@ namespace rpc { submit_raw_tx_request() = delete; std::string tx; - boost::optional flash; + std::string fee; }; void read_bytes(wire::json_reader&, submit_raw_tx_request&);