mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-06 13:34:38 -04:00
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
This commit is contained in:
parent
9f1d58d944
commit
c7c7cf1886
7 changed files with 40 additions and 28 deletions
|
@ -19,5 +19,5 @@ anyhow = "1"
|
|||
once_cell = "1"
|
||||
serde = { version = "1", features = [ "derive" ] }
|
||||
serde_json = "1"
|
||||
swap = { path = "../swap" }
|
||||
swap = { path = "../swap", features = [ "tauri" ] }
|
||||
tauri = { version = "2.0.0-rc.1", features = [ "config-json5" ] }
|
||||
|
|
|
@ -6,6 +6,7 @@ use swap::cli::{
|
|||
BalanceArgs, BuyXmrArgs, GetHistoryArgs, GetSwapInfosAllArgs, ResumeSwapArgs,
|
||||
SuspendCurrentSwapArgs, WithdrawBtcArgs,
|
||||
},
|
||||
tauri_bindings::TauriHandle,
|
||||
Context, ContextBuilder,
|
||||
},
|
||||
command::{Bitcoin, Monero},
|
||||
|
@ -86,7 +87,7 @@ tauri_command!(suspend_current_swap, SuspendCurrentSwapArgs, no_args);
|
|||
tauri_command!(get_swap_infos_all, GetSwapInfosAllArgs, no_args);
|
||||
tauri_command!(get_history, GetHistoryArgs, no_args);
|
||||
|
||||
fn setup<'a>(app: &'a mut tauri::App) -> Result<(), Box<dyn std::error::Error>> {
|
||||
fn setup(app: &mut tauri::App) -> Result<(), Box<dyn std::error::Error>> {
|
||||
tauri::async_runtime::block_on(async {
|
||||
let context = ContextBuilder::new(true)
|
||||
.with_bitcoin(Bitcoin {
|
||||
|
@ -98,7 +99,7 @@ fn setup<'a>(app: &'a mut tauri::App) -> Result<(), Box<dyn std::error::Error>>
|
|||
})
|
||||
.with_json(true)
|
||||
.with_debug(true)
|
||||
.with_tauri(app.app_handle().to_owned())
|
||||
.with_tauri(TauriHandle::new(app.app_handle().to_owned()))
|
||||
.build()
|
||||
.await
|
||||
.expect("failed to create context");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue