v0.2.6-pre.011
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-wallet-desk/src/tauri.rs
|
||||
// version: 8
|
||||
// version: 9
|
||||
|
||||
//! Tauri runtime assembly for the KSP wallet desktop application.
|
||||
|
||||
@@ -45,12 +45,14 @@ fn configure_commands(builder: tauri::Builder<tauri::Wry>) -> tauri::Builder<tau
|
||||
create_wallet,
|
||||
delete_wallet_note,
|
||||
deselect_wallet,
|
||||
disable_wallet_view,
|
||||
emit_frontend_log,
|
||||
get_runtime_status,
|
||||
import_wallet,
|
||||
inspect_import_source,
|
||||
list_wallets,
|
||||
lock_wallet,
|
||||
recreate_wallet_view,
|
||||
refresh_wallet_balance,
|
||||
refresh_wallets,
|
||||
rotate_owner_password,
|
||||
@@ -135,6 +137,15 @@ fn deselect_wallet(state: tauri::State<'_, crate::AppState>) -> std::result::Res
|
||||
};
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn disable_wallet_view(state: tauri::State<'_, crate::AppState>) -> std::result::Result<crate::WalletViewSecurityStatusDto, crate::CommandErrorDto> {
|
||||
let result = state.disable_wallet_view().await;
|
||||
return match result {
|
||||
std::result::Result::Ok(value) => std::result::Result::Ok(value),
|
||||
std::result::Result::Err(error) => std::result::Result::Err(crate::CommandErrorDto::from_error(&error)),
|
||||
};
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn emit_frontend_log(payload: crate::FrontendLogPayloadDto) -> std::result::Result<(), crate::CommandErrorDto> {
|
||||
let result = crate::emit_frontend_log_event(payload);
|
||||
@@ -206,6 +217,18 @@ async fn inspect_import_source(
|
||||
};
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn recreate_wallet_view(
|
||||
request: crate::WalletPasswordRotationRequestDto,
|
||||
state: tauri::State<'_, crate::AppState>,
|
||||
) -> std::result::Result<crate::WalletViewSecurityStatusDto, crate::CommandErrorDto> {
|
||||
let result = state.recreate_wallet_view(request).await;
|
||||
return match result {
|
||||
std::result::Result::Ok(value) => std::result::Result::Ok(value),
|
||||
std::result::Result::Err(error) => std::result::Result::Err(crate::CommandErrorDto::from_error(&error)),
|
||||
};
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn refresh_wallet_balance(state: tauri::State<'_, crate::AppState>) -> std::result::Result<crate::WalletBalanceDto, crate::CommandErrorDto> {
|
||||
let result = state.refresh_wallet_balance().await;
|
||||
|
||||
Reference in New Issue
Block a user