mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-05-02 06:46:06 -04:00
feat(gui): Add button to display monero redeem recovery keys (#64)
This commit is contained in:
parent
e4bddd2287
commit
177e3e9949
14 changed files with 90 additions and 49 deletions
|
@ -3,8 +3,8 @@ use std::sync::Arc;
|
|||
use swap::cli::{
|
||||
api::{
|
||||
request::{
|
||||
BalanceArgs, BuyXmrArgs, GetHistoryArgs, GetSwapInfosAllArgs, ResumeSwapArgs,
|
||||
SuspendCurrentSwapArgs, WithdrawBtcArgs,
|
||||
BalanceArgs, BuyXmrArgs, GetHistoryArgs, GetSwapInfosAllArgs, MoneroRecoveryArgs,
|
||||
ResumeSwapArgs, SuspendCurrentSwapArgs, WithdrawBtcArgs,
|
||||
},
|
||||
tauri_bindings::{TauriContextStatusEvent, TauriEmitter, TauriHandle},
|
||||
Context, ContextBuilder,
|
||||
|
@ -167,7 +167,9 @@ pub fn run() {
|
|||
buy_xmr,
|
||||
resume_swap,
|
||||
get_history,
|
||||
suspend_current_swap
|
||||
monero_recovery,
|
||||
suspend_current_swap,
|
||||
is_context_available,
|
||||
])
|
||||
.setup(setup)
|
||||
.build(tauri::generate_context!())
|
||||
|
@ -203,6 +205,15 @@ tauri_command!(get_balance, BalanceArgs);
|
|||
tauri_command!(buy_xmr, BuyXmrArgs);
|
||||
tauri_command!(resume_swap, ResumeSwapArgs);
|
||||
tauri_command!(withdraw_btc, WithdrawBtcArgs);
|
||||
tauri_command!(monero_recovery, MoneroRecoveryArgs);
|
||||
|
||||
// These commands require no arguments
|
||||
tauri_command!(suspend_current_swap, SuspendCurrentSwapArgs, no_args);
|
||||
tauri_command!(get_swap_infos_all, GetSwapInfosAllArgs, no_args);
|
||||
tauri_command!(get_history, GetHistoryArgs, no_args);
|
||||
|
||||
/// Here we define Tauri commands whose implementation is not delegated to the Request trait
|
||||
#[tauri::command]
|
||||
async fn is_context_available(context: tauri::State<'_, RwLock<State>>) -> Result<bool, String> {
|
||||
Ok(context.read().await.try_get_context().is_ok())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue