mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-04-29 04:06:28 -04:00

- 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`.
41 lines
1.5 KiB
Markdown
41 lines
1.5 KiB
Markdown
## Recommended IDE Setup
|
|
|
|
- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
|
|
|
|
## Requirements
|
|
|
|
- For compiling the Rust code: `cargo` and `cargo tauri` ([installation](https://v2.tauri.app/reference/cli/))
|
|
- For running the Typescript code: `node` and `yarn`
|
|
- For formatting and bindings: `dprint` (`cargo install dprint@0.39.1`) and `typeshare` (`cargo install typeshare-cli`)
|
|
- If you are on Windows and you want to use the `check-bindings` command you'll need to manually install the GNU DiffUtils ([installation](https://gnuwin32.sourceforge.net/packages/diffutils.htm)) and GNU CoreUtils ([installtion](https://gnuwin32.sourceforge.net/packages/coreutils.htm)). Remember to add the installation path (probably `C:\Program Files (x86)\GnuWin32\bin`) to the `PATH` in your enviroment variables.
|
|
|
|
## Start development servers
|
|
|
|
For development, we need to run both `vite` and `tauri` servers:
|
|
|
|
```bash
|
|
cd src-gui
|
|
yarn install && yarn run dev
|
|
# let this run
|
|
```
|
|
|
|
```bash
|
|
cd src-tauri
|
|
cargo tauri dev
|
|
# let this run as well
|
|
```
|
|
|
|
## Generate bindings for Tauri API
|
|
|
|
Running `yarn run dev` or `yarn build` should automatically re-build the Typescript bindings whenever something changes. You can also manually trigger this using the `gen-bindings` command:
|
|
|
|
```bash
|
|
yarn run gen-bindings
|
|
```
|
|
|
|
You can also check whether the current bindings are up to date:
|
|
|
|
```bash
|
|
yarn run check-bindings
|
|
```
|