Skip to content

Commit

Permalink
flash method handled for client
Browse files Browse the repository at this point in the history
  • Loading branch information
TechGoku committed Jan 17, 2023
1 parent 41fee1e commit cdd7ba1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/lws/src/rest_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/lws/src/rpc/light_wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/lws/src/rpc/light_wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ namespace rpc
{
submit_raw_tx_request() = delete;
std::string tx;
boost::optional<bool> flash;
std::string fee;
};
void read_bytes(wire::json_reader&, submit_raw_tx_request&);

Expand Down

0 comments on commit cdd7ba1

Please sign in to comment.