mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-16 17:14:13 -05:00
feat(tauri): Allow export of wallet descriptors (#118)
This commit is contained in:
parent
898c7a2450
commit
c91adb3ac8
6 changed files with 141 additions and 11 deletions
|
|
@ -346,13 +346,22 @@ impl Request for GetConfig {
|
|||
}
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct ExportBitcoinWalletArgs;
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct ExportBitcoinWalletResponse {
|
||||
pub wallet_descriptor: serde_json::Value,
|
||||
}
|
||||
|
||||
impl Request for ExportBitcoinWalletArgs {
|
||||
type Response = serde_json::Value;
|
||||
type Response = ExportBitcoinWalletResponse;
|
||||
|
||||
async fn request(self, ctx: Arc<Context>) -> Result<Self::Response> {
|
||||
export_bitcoin_wallet(ctx).await
|
||||
let wallet_descriptor = export_bitcoin_wallet(ctx).await?;
|
||||
Ok(ExportBitcoinWalletResponse { wallet_descriptor })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue