Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "keeper-desktop",
"private": true,
"version": "0.2.2",
"version": "0.2.3",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
94 changes: 16 additions & 78 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "keeper-desktop"
version = "0.2.2"
version = "0.2.3"
description = "Bitcoin Keeper Desktop App"
authors = ["Ben Kaufman"]
repository = "https://github.com/bithyve/keeper-desktop"
Expand All @@ -23,8 +23,8 @@ hex = "0.4.3"
log = "0.4"
thiserror = "1.0"
env_logger = "0.10"
bitcoin = { version = "0.31", features = ["serde", "base64"] }
async-hwi = "0.0.25"
bitcoin = { version = "0.32", features = ["serde", "base64"] }
async-hwi = "0.0.27"
x25519-dalek = "2.0.1"

[features]
Expand Down
6 changes: 3 additions & 3 deletions src-tauri/src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ pub fn get_xpubs(
}

Ok(json!({
"singleSigPath": ss_path.to_string(),
"singleSigPath": format!("m/{}", ss_path.to_string()),
"singleSigXpub": single_sig_xpub.to_string(),
"multiSigPath": ms_path.to_string(),
"multiSigPath": format!("m/{}", ms_path.to_string()),
"multiSigXpub": multi_sig_xpub.to_string(),
"taprootPath": tr_path.to_string(),
"taprootPath": format!("m/{}", tr_path.to_string()),
"taprootXpub": taproot_xpub.to_string(),
"mfp": hwi_state.fingerprint.as_ref().unwrap().to_string().to_uppercase(),
}))
Expand Down
13 changes: 7 additions & 6 deletions src-tauri/src/hwi/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ impl<T: HWIImplementation> HWIClient<T> {
path: &DerivationPath,
expert: bool,
) -> Result<HWIExtendedPubKey, Error> {
let output = self.implementation.get_xpub(&path.to_string(), expert)?;
let prefixed_path = format!("m/{}", path);
let output = self.implementation.get_xpub(&prefixed_path, expert)?;
deserialize_obj!(&output)
}

Expand All @@ -155,9 +156,8 @@ impl<T: HWIImplementation> HWIClient<T> {
message: &str,
path: &DerivationPath,
) -> Result<HWISignature, Error> {
let output = self
.implementation
.sign_message(message, &path.to_string())?;
let prefixed_path = format!("m/{}", path);
let output = self.implementation.sign_message(message, &prefixed_path)?;
deserialize_obj!(&output)
}

Expand All @@ -183,7 +183,7 @@ impl<T: HWIImplementation> HWIClient<T> {
start: u32,
end: u32,
) -> Result<Vec<HWIKeyPoolElement>, Error> {
let path_str = path.map(|p| p.to_string());
let path_str = path.map(|p| format!("m/{}/*", p));
let output = self.implementation.get_keypool(
keypool,
internal,
Expand Down Expand Up @@ -222,9 +222,10 @@ impl<T: HWIImplementation> HWIClient<T> {
path: &DerivationPath,
address_type: HWIAddressType,
) -> Result<HWIAddress, Error> {
let prefixed_path = format!("m/{}", path);
let output = self
.implementation
.display_address_with_path(&path.to_string(), address_type)?;
.display_address_with_path(&prefixed_path, address_type)?;
deserialize_obj!(&output)
}

Expand Down
7 changes: 5 additions & 2 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ async fn hwi_sign_tx(
)
.await?;

let mut psbt_obj = bitcoin::Psbt::from_str(&psbt).map_err(|e| e.to_string())?;

if hwi_state.device_type != HWIDeviceType::Coldcard {
let is_registered = device
.is_wallet_registered(&wallet_name.clone().unwrap_or_default(), &policy)
Expand Down Expand Up @@ -274,10 +276,11 @@ async fn hwi_sign_tx(
.await?;
}
}
} else {
// Coldcard change verification gives an error when xpubs are included for Miniscript scheme
psbt_obj.xpub.clear();
}

let mut psbt_obj = bitcoin::Psbt::from_str(&psbt).map_err(|e| e.to_string())?;

device
.sign_tx(&mut psbt_obj)
.await
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"package": {
"productName": "Keeper Desktop (Dev)",
"version": "0.2.2"
"version": "0.2.3"
},
"tauri": {
"allowlist": {
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.release.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "Keeper Desktop",
"version": "0.2.2"
"version": "0.2.3"
},
"tauri": {
"allowlist": {
Expand Down