mirror of
https://github.com/Qortal/piratewallet-light-cli.git
synced 2025-07-30 03:41:28 +00:00
Process SendResponse better
This commit is contained in:
@@ -714,7 +714,12 @@ impl LightClient {
|
|||||||
client.send_transaction(Request::new(RawTransaction {data: tx_bytes.to_vec(), height: 0}))
|
client.send_transaction(Request::new(RawTransaction {data: tx_bytes.to_vec(), height: 0}))
|
||||||
})
|
})
|
||||||
.and_then(move |response| {
|
.and_then(move |response| {
|
||||||
infostrinner.replace(format!("{:?}", response.into_inner()));
|
let sendresponse = response.into_inner();
|
||||||
|
if sendresponse.error_code == 0 {
|
||||||
|
infostrinner.replace(format!("Successfully broadcast Tx: {}", sendresponse.error_message));
|
||||||
|
} else {
|
||||||
|
infostrinner.replace(format!("Error: {:?}", sendresponse));
|
||||||
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
|
Reference in New Issue
Block a user