Skip to content

Commit

Permalink
Fix xpub
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptoquick committed Jan 14, 2024
1 parent 2835943 commit e1c80c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/web/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 lib/web/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "bitmask-core",
"name": "bitmask-segwit",
"collaborators": [
"Jose Diego Robles <[email protected]>",
"Hunter Trujillo <[email protected]>",
Expand Down
4 changes: 2 additions & 2 deletions src/bitcoin/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ fn xpub_desc(xprv: &ExtendedPrivKey, path: &str, change: u32) -> Result<String,
let xpub = xprv.to_public(&secp)?;

#[cfg(not(feature = "segwit"))]
let desc = format!("tr({xprv})");
let desc = format!("tr({xpub})");
#[cfg(feature = "segwit")]
let desc = format!("wpkh({xprv})");
let desc = format!("wpkh({xpub})");

Ok(desc)
}
Expand Down

0 comments on commit e1c80c5

Please sign in to comment.