mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-21 19:36:56 -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
|
|
@ -25,6 +25,8 @@ import {
|
|||
GetDataDirArgs,
|
||||
ResolveApprovalArgs,
|
||||
ResolveApprovalResponse,
|
||||
RedactArgs,
|
||||
RedactResponse,
|
||||
} from "models/tauriModel";
|
||||
import {
|
||||
rpcSetBalance,
|
||||
|
|
@ -40,6 +42,8 @@ import { getNetwork, isTestnet } from "store/config";
|
|||
import { Blockchain, Network } from "store/features/settingsSlice";
|
||||
import { setStatus } from "store/features/nodesSlice";
|
||||
import { discoveredMakersByRendezvous } from "store/features/makersSlice";
|
||||
import { CliLog } from "models/cliModel";
|
||||
import { logsToRawString, parseLogsFromString } from "utils/parseUtils";
|
||||
|
||||
export const PRESET_RENDEZVOUS_POINTS = [
|
||||
"/dns4/discover.unstoppableswap.net/tcp/8888/p2p/12D3KooWA6cnqJpVnreBVnoro8midDL9Lpzmg8oJPoAGi7YYaamE",
|
||||
|
|
@ -164,6 +168,18 @@ export async function getLogsOfSwap(
|
|||
});
|
||||
}
|
||||
|
||||
/// Call the rust backend to redact logs.
|
||||
export async function redactLogs(
|
||||
logs: (string | CliLog)[]
|
||||
): Promise<(string | CliLog)[]> {
|
||||
const response = await invoke<RedactArgs, RedactResponse>("redact", {
|
||||
text: logsToRawString(logs)
|
||||
})
|
||||
|
||||
console.log(response.text.split("\n").length)
|
||||
return parseLogsFromString(response.text);
|
||||
}
|
||||
|
||||
export async function listSellersAtRendezvousPoint(
|
||||
rendezvousPointAddress: string,
|
||||
): Promise<ListSellersResponse> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue