3035 Commits

Author SHA1 Message Date
binarybaron
063f9dbf9b
feat(gui, swap): allow change-address to be omitted and default to internal wallet (#68)
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>
2024-09-09 19:47:15 +02:00
binarybaron
91482f1e16
ci: Publish docker images to ghcr.io instead of docker hub 2024-09-09 13:23:06 +02:00
binarybaron
8adf86d010
ci: Use botty github token to release gui releases 2024-09-09 13:04:43 +02:00
binarybaron
125dc8c6ef
ci: build frontend in dev mode 2024-09-08 19:24:54 +02:00
binarybaron
0bf82fb4bb CI: build and release binaries for prelease of GUI 2024-09-08 19:02:13 +02:00
binarybaron
ba4a9bd9c6
feat(gui): Only display alert on history page if funds have been locked (#66) 2024-09-06 23:55:36 +02:00
binarybaron
5411c05d27
ci: Update tauri-apps/tauri-action to v0.5 2024-09-06 23:38:10 +02:00
binarybaron
2a339231b1
ci: create gui preview release on push to master (#65)
- Adds a Github action file that build the binaries
- Run yarn build command before tauri build is started
- Disable tauri config csp rules
2024-09-06 23:29:16 +02:00
binarybaron
177e3e9949
feat(gui): Add button to display monero redeem recovery keys (#64) 2024-09-06 14:23:36 +02:00
binarybaron
e4bddd2287
feat(tauri): Automatically start frontend dev server when running cargo tauri dev (#63) 2024-09-06 13:25:26 +02:00
Einliterflasche
ff2e3ae8dd
feat(gui): open links in default browser (#50) 2024-09-04 17:11:06 +02:00
binarybaron
e4141c763b
feat(tauri): Initialize Context in background (#59)
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
2024-09-03 12:28:30 +02:00
binarybaron
792fbbf746
feat(asb + cli): Redact logs + unify tracing infrastructure (#1733) (#55)
* feat(asb + cli): Redact logs + unify tracing infrastructure (#1733)

Applies the changes from https://github.com/comit-network/xmr-btc-swap/pull/1733 to this fork

---------

Co-authored-by: Einliterflasche <81313171+Einliterflasche@users.noreply.github.com>
2024-09-01 18:13:43 +02:00
Einliterflasche
1fe6391b7b
ci: auto generate typescript bindings (#56)
This PR 
 - removes `tauriModel.ts` from git and instead
 - generates `tauriModel.ts` everytime `vite` starts or `vite` detects a change in `swap/src/`
 
To do that I have introduced the `gen-bindings` and `check-bindings` commands as well as improved documentation. Following this PR, the Typescript bindings to our Tauri commands will be automatically re-generated upon the instant a source file is changed! 

This closes #49
2024-08-31 11:41:33 +02:00
binarybaron
bcd2d95f03
feat(cli): Change default testnet electrum server (#54) 2024-08-29 14:30:40 +02:00
Einliterflasche
ff1ded55ba
feat(gui): Clickable addresses to copy to clipboard (#38) 2024-08-29 14:28:23 +02:00
binarybaron
1b1fe0add5
Merge pull request #53 from UnstoppableSwap/gui/tauri-event-listener-init-fn
refactor(gui): Put tauri event listener registeres in dedicated function
2024-08-29 13:58:30 +02:00
binarybaron
b8c8a566b3
refactor(gui): Put tauri event listener registeres in dedicated function 2024-08-29 13:57:47 +02:00
binarybaron
05a661872b
chore(gui): Add .vite folder to gitignore 2024-08-29 13:57:25 +02:00
binarybaron
d913206062
feat(gui): Preserve global state across page reloads (#48) 2024-08-29 13:38:11 +02:00
binarybaron
c7c7cf1886
Merge pull request #37 from UnstoppableSwap/tauri-feature-flag
Introducing a feature flag in the swap crate that conditionally enables the tauri depencendy. This allows compiling the swap crate without the heavy tauri dependency. This also enables us to build arm binaries in the CI again.

This closes #32 and #34
2024-08-28 22:54:28 +02:00
binarybaron
9f1d58d944
Merge pull request #40 from UnstoppableSwap/change-electrum-server-testnet-default-cli
feat(cli): Change default electrum testnet server
2024-08-28 13:56:40 +02:00
binarybaron
8208b2f8cc
feat(cli): Change default electrum testnet server 2024-08-28 13:55:15 +02:00
binarybaron
aac366ffc9
Merge pull request #36 from UnstoppableSwap/fix-rpc-tests
refactor(cli): Refactor RPC server and fix tests
2024-08-28 12:25:53 +02:00
binarybaron
66d1e7d72f
chore(monero, monero_harness): bump tracing-subscriber to 0.3 2024-08-28 12:18:58 +02:00
binarybaron
57c153de99
refactor(cli): Refactor RPC server and fix tests
- Use the Request trait introduced in https://github.com/UnstoppableSwap/xmr-btc-swap/pull/10 for the RPC server
- Delegate deserialization of RPC server method parameters to serde by using structs like BuyXmrArgs
- Remove `get_raw_states` RPC server method because it's not used
- Fix RPC server tests including removing test for the "log reference id" feature which was removed as part of https://github.com/UnstoppableSwap/xmr-btc-swap/pull/10
- Rename GetCurrentSwap struct to GetCurrentSwapArgs
2024-08-28 12:18:58 +02:00
binarybaron
ca25e0454f fix(tauri, gui): Allow Tauri command to be called with empty arguments
- Allow Tauri command to be called with empty arguments
- Add struct for GetSwapInfosAllArgs
2024-08-27 22:34:21 +02:00
binarybaron
de1f77bf80 fix(tauri_bindings): Emit swap id with WaitingForBtcDeposit event 2024-08-27 22:34:21 +02:00
binarybaron
88cfd6bc3e
chore(ci): Temporarily disable armv7 cross compilation (#35) 2024-08-27 20:27:54 +02:00
binarybaron
2131500c7d chore: downgrade rust toolchain to 1.79 2024-08-27 18:07:49 +02:00
binarybaron
b2475763a7 chore(swap): Remove redundant clone of BidQuote 2024-08-27 17:55:30 +02:00
Einliterflasche
c562e352f2 refactor(cli): Builder pattern for constructing Context 2024-08-27 17:55:03 +02:00
binarybaron
015c956273 fix(swap): Clippy errors (too many arguments, redundant clone) 2024-08-26 18:03:04 +02:00
binarybaron
dc3c937333 fix(swap): Unit test compilation errors 2024-08-26 18:03:04 +02:00
Einliterflasche
a57e3aff75
clean: use dprint 2024-08-26 16:19:11 +02:00
binarybaron
e3547fbec2
Merge pull request #10 from UnstoppableSwap/tauri-events
feat: Send progress events from Host to Guest
2024-08-26 16:14:29 +02:00
binarybaron
26f0f54864
Merge branch 'master' into tauri-events 2024-08-26 16:10:28 +02:00
binarybaron
349035d321
refactor(tauri, swap): move rpc api to cli/api 2024-08-26 15:41:00 +02:00
binarybaron
5425a83871
bump: Rust version to 1.80 2024-08-26 15:39:59 +02:00
binarybaron
cf641bc8bb
feat(gui): Migrate to Tauri events
- 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
2024-08-26 15:32:28 +02:00
binarybaron
d54f5c6c77
refactor(tauri): Use macro and new Request trait for command generation 2024-08-26 15:26:21 +02:00
binarybaron
9b0023174b
feat(gui): Add typeshare definitions 2024-08-26 15:23:46 +02:00
binarybaron
4939d63524
refactor(swap, tauri_bindings): Overhaul API architecture and introduce Tauri events
- Implement trait-based request handling in api/request.rs
- Add Tauri bindings and event system in api/tauri_bindings.rs
- Refactor CLI command parsing and execution in cli/command.rs
- Update RPC methods to use new request handling approach
- Emit Tauri events in swap/src/protocol/bob/swap.rs
- Add typescript type bindings use typeshare crate
2024-08-26 15:18:11 +02:00
binarybaron
fea1e66c64
chore(gui): Upgrade @tauri-apps/api and add eslint 2024-08-26 15:04:22 +02:00
binarybaron
6088bd18b4
chore: Add prettier plugin to dprint config 2024-08-26 15:03:03 +02:00
binarybaron
956a26d181
refactor(gui): Reorganize imports 2024-08-26 15:02:26 +02:00
Einliterflasche
5962effa50
docs: update READMEs (#25) 2024-08-23 13:26:10 +02:00
binarybaron
ef7c1abcaf
CI: Install dependencies required by Tauri (ci.yml) (#23) 2024-08-19 07:27:40 +02:00
Einliterflasche
c897c4c6e9 Fix swap/src/bin/swap.rs import issue 2024-08-12 11:29:05 +02:00
Einliterflasche
3135e58187 Merge remote-tracking branch 'repo-b/kill-monero-wallet-rpc-on-quit' 2024-08-10 21:33:29 +02:00