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 PR tackles #92
- Add the `tauri-plugin-cli` (only on desktop)
- Check in the frontend if the `--testnet` flag is set. If it's set we pass `testnet=true` to the `initialize_context` command on invokation
- We add the `vite-plugin-top-level-await` to allow top level await in all browsers
- Remove the `bitcoin_confirmation_target` from settings for simplicity
- Send event when new swap state is inserated into database. The event only has the `swap_id` attached. The frontend then sends a request to the `get_swap_info` command to retrieve the updated version
- Send event when the Bitcoin lock transaction gets a new confirmation
- A new `watcher` daemon runs contineously and sends an event when the timelock updated. The event has the the `swap_id` and the timelock attached
- Display logs on `ProcessExitedPage` (if swap was stopped prematurely)
- Rename `CliLogEmittedEvent` to `TauriLogEvent`
- Apply env_filter to tracing terminal writer to silence logging from other crates
- Add `.env.*` files in `src-gui` to `.gitingore`
Closes#93 and #12
- Implemented dual persistence strategy:
- **User Settings**: Persisted across app restarts using `tauri-plugin-store`.
- **Transient State**: Persisted across page reloads using `sessionStorage`.
- Added `settingsSlice` reducer for managing persistent user settings.
- Updated Redux store configuration to handle multiple persistence layers.
- Added a new Settings page in the GUI where users can specify custom Electrum RPC URLs for Bitcoin and Monero node URLs.
- Users can input their preferred Electrum server (`ssl://host:port`) and Monero daemon (`http://host:port`).
- Input fields include validation to ensure correct URL formats.
- Settings persist across application restarts using Tauri's storage plugin.
- A reset option is available to revert to default settings.
- Improved the Daemon Controller in the Help page:
- Renamed `RpcControlBox` to `DaemonControlBox` for clarity.
- Users can now start the daemon manually if it isn't running or has failed.
- Added a "Restart GUI" button to apply new settings immediately.
- Displayed the daemon's status within the controller.
- Upgraded Tauri and related plugins to stable version `2.0.0`:
- Updated `tauri`, `tauri-build`, and `tauri-utils` to `2.0.0`.
- Ensured compatibility with the latest stable release.
- Updated Tauri plugins to version `2.0.0`:
- `tauri-plugin-clipboard-manager`
- `tauri-plugin-shell`
- Added new plugins:
- `tauri-plugin-store` for settings persistence.
- `tauri-plugin-process` to enable application relaunch.
- Deferred Context initialization until explicitly triggered from the frontend.
- Moved Context setup from the `setup` function to a new `initialize_context` Tauri command.
- Allows the application to start without immediately initializing the backend context.
- Context initialization now considers user-provided settings for Electrum and Monero nodes.
- Introduced a `ValidatedTextField` component for form inputs with validation logic.
- Provides immediate feedback on input validity.
- Used in the Settings page for Electrum and Monero node URLs.
- If the user provides an override Monero remote daemon, we check if it reachable and on the correct network before starting the `monero-wallet-rpc`
- Changed `bitcoin_confirmation_target` type from `usize` to `u16`.
Previously we used the data we fetched via the rpc (`GetSwapInfo` call, saved in redux in `rpc.swapInfos`) to decide what to display in the state stepper to the user. The state stepper is displayed at the bottom of the `SwapDialog`.
However, we are moving away from our depedence on periodic rpc calls and towards relying more and more on the events we receive from the Host (from Tauri). Our goal is to rely solely on the Tauri events for everything displayed about the currently running swap.
This PR includes the following changes:
- refactor the `SwapStateStepper` such that it relies only on the Tauri events
- emit two new Tauri events (`EncryptedSignatureSent`, `CancelTimelockExpired`) in the state machine
- correctly emit `BtcRefunded` Tauri event after Bitcoin refund transaction is published
- differentiate between `"Waiting for them to redeem the Bitcoin"` and `"Revealing encrypted signature to the other party"` on the `SwapStatePage` (content displayed in the center of the `SwapDialog`)
We now,
- emit a Tauri event when the Monero lock transaction receives a new confirmation
- emit a Tauri event with a list of transaction hashes once we have published the Monero redeem transaction
- gui: display the confirmations and txids
This PR closes#12.
This PR:
- allows --change-address to be omitted and default to internal wallet address (https://github.com/comit-network/xmr-btc-swap/pull/1709). This is a change that is merged from upstream into our fork
- adds the necessary components for the tauri integration and the ui components to allow toggling between internal vs external refund address
Co-authored-by: binarybaron <86064887+binarybaron@users.noreply.github.com>
Co-authored-by: Einliterflasche <81313171+Einliterflasche@users.noreply.github.com>
Co-authored-by: Byron Hambly <byron@hambly.dev>
This PR does the following:
- The Context (including Bitcoin wallet, Monero wallet, ...) is initialized in the background. This allows the window to be displayed instantly upon startup.
- Host sends events to Guest about progress of Context initialization. Those events are used to display an alert in the navigation bar.
- If a Tauri command is invoked which requires the Context to be available, an error will be returned
- As soon as the Context becomes available the `Guest` requests the history and Bitcoin balance
- Re-enables Material UI animations
- Replace Electron IPC with Tauri invoke() for API calls
- Implement TauriSwapProgressEvent for state management
- Remove IpcInvokeButton, replace with PromiseInvokeButton
- Update models: new tauriModel.ts, refactor rpcModel.ts
- Simplify SwapSlice state, remove processRunning flag
- Refactor SwapStatePage to use TauriSwapProgressEvent
- Update HistoryRow and HistoryRowActions for new data structures
- Remove unused Electron-specific components (e.g., RpcStatusAlert)
- Update dependencies: React 18, Material-UI v4 to v5
- Implement typeshare for Rust/TypeScript type synchronization
- Add BobStateName enum for more precise swap state tracking
- Refactor utility functions for Tauri compatibility
- Remove JSONStream and other Electron-specific dependencies