mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-11-25 02:13:11 -05:00
feat(gui): Review logs before sending feedback (#301)
* add review buttons that open the attached logs before submitting feedback * add redact switches to redact transaction id's from attached logs
This commit is contained in:
parent
3fa31ba139
commit
e8084d65ec
9 changed files with 255 additions and 85 deletions
|
|
@ -3,7 +3,7 @@ use crate::bitcoin::{wallet, CancelTimelock, ExpiredTimelocks, PunishTimelock, T
|
|||
use crate::cli::api::tauri_bindings::{TauriEmitter, TauriSwapProgressEvent};
|
||||
use crate::cli::api::Context;
|
||||
use crate::cli::{list_sellers as list_sellers_impl, EventLoop, Seller, SellerStatus};
|
||||
use crate::common::get_logs;
|
||||
use crate::common::{get_logs, redact};
|
||||
use crate::libp2p_ext::MultiAddrExt;
|
||||
use crate::monero::wallet_rpc::MoneroDaemon;
|
||||
use crate::network::quote::{BidQuote, ZeroQuoteReceived};
|
||||
|
|
@ -420,6 +420,29 @@ impl Request for GetLogsArgs {
|
|||
}
|
||||
}
|
||||
|
||||
/// Best effort redaction of logs, e.g. wallet addresses, swap-ids
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct RedactArgs {
|
||||
pub text: String,
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Debug)]
|
||||
pub struct RedactResponse {
|
||||
pub text: String,
|
||||
}
|
||||
|
||||
impl Request for RedactArgs {
|
||||
type Response = RedactResponse;
|
||||
|
||||
async fn request(self, _: Arc<Context>) -> Result<Self::Response> {
|
||||
Ok(RedactResponse {
|
||||
text: redact(&self.text),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Debug, Eq, PartialEq, Serialize, Deserialize)]
|
||||
pub struct GetMoneroAddressesArgs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue