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:
binarybaron 2024-10-13 22:04:47 +06:00 committed by GitHub
parent 639f540876
commit 2bffe40a37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 116 additions and 50 deletions

View file

@ -7,6 +7,8 @@ import {
SatsAmount,
} from "renderer/components/other/Units";
import { satsToBtc, secondsToDays } from "utils/conversionUtils";
import { isProviderOutdated } from 'utils/multiAddrUtils';
import WarningIcon from '@material-ui/icons/Warning';
const useStyles = makeStyles((theme) => ({
content: {
@ -29,6 +31,7 @@ export default function ProviderInfo({
provider: ExtendedProviderStatus;
}) {
const classes = useStyles();
const isOutdated = isProviderOutdated(provider);
return (
<Box className={classes.content}>
@ -70,6 +73,11 @@ export default function ProviderInfo({
<Chip label="Recommended" icon={<VerifiedUser />} color="primary" />
</Tooltip>
)}
{isOutdated && (
<Tooltip title="This provider is running an outdated version of the software. Outdated providers may be unreliable and cause swaps to take longer to complete or fail entirely.">
<Chip label="Outdated" icon={<WarningIcon />} color="primary" />
</Tooltip>
)}
</Box>
</Box>
);