mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-05-11 11:14:59 -04:00
Merge changes from legacy GUI, allow daemon logs to be attached to feedback (#115)
This PR applies all remaining changes from https://github.com/UnstoppableSwap/unstoppableswap-gui/pull/210 - Added checkbox option to attach daemon logs when submitting feedback - Added "Outdated" chip with warning icon for providers running outdated asb versions - Updated `BitcoinPunishedPage` to display different messages for BtcPunished and CooperativeRedeemRejected states (including reason for failed cooperative redeem) - Added "Attempt recovery" button for swaps in BtcPunished state - Modified `getBitcoinTxExplorerUrl` to use mempool.space instead of blockchair.com - Added `useResumeableSwapsCountExcludingPunished` hook to count resumable swaps excluding punished ones, use it for the badge and alert - Updated `sortProviderList` function to filter out incompatible providers before sorting - Added `TauriSwapProgressEventExt` type to extract specific event types from TauriSwapProgressEvent
This commit is contained in:
parent
639f540876
commit
2bffe40a37
12 changed files with 116 additions and 50 deletions
|
@ -16,6 +16,7 @@ import { resumeSwap } from "renderer/rpc";
|
|||
|
||||
export function SwapResumeButton({
|
||||
swap,
|
||||
children,
|
||||
...props
|
||||
}: ButtonProps & { swap: GetSwapInfoResponse }) {
|
||||
return (
|
||||
|
@ -27,7 +28,7 @@ export function SwapResumeButton({
|
|||
onInvoke={() => resumeSwap(swap.swap_id)}
|
||||
{...props}
|
||||
>
|
||||
Resume
|
||||
{ children }
|
||||
</PromiseInvokeButton>
|
||||
);
|
||||
}
|
||||
|
@ -75,15 +76,13 @@ export default function HistoryRowActions(swap: GetSwapInfoResponse) {
|
|||
);
|
||||
}
|
||||
|
||||
// TODO: Display a button here to attempt a cooperative redeem
|
||||
// See this PR: https://github.com/UnstoppableSwap/unstoppableswap-gui/pull/212
|
||||
if (swap.state_name === BobStateName.BtcPunished) {
|
||||
return (
|
||||
<Tooltip title="This swap is completed. You have been punished.">
|
||||
<ErrorIcon style={{ color: red[500] }} />
|
||||
<Tooltip title="You have been punished. You can attempt to recover the Monero with the help of the other party but that is not guaranteed to work">
|
||||
<SwapResumeButton swap={swap} size="small">Attempt recovery</SwapResumeButton>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
||||
return <SwapResumeButton swap={swap} />;
|
||||
return <SwapResumeButton swap={swap}>Resume</SwapResumeButton>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue