Make the JS client accept the 'Bitcoin Recovery' app
What changed, and why it matters
This commit updates the JavaScript client for Ledger's Bitcoin app so it also recognizes an app named 'Bitcoin Recovery' as the main Bitcoin network app. Previously, only 'Bitcoin' and 'Bitcoin Test' were accepted. This is a small compatibility change and does not appear to be a security fix.
No security action required. Treat as a routine compatibility update.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change adds ‘Bitcoin Recovery’ as an accepted value for appAndVer.name alongside ‘Bitcoin’ when selecting the networks.bitcoin configuration in bitcoin_client_js/src/lib/appClient.ts. The error message is updated accordingly. There is no change to cryptographic validation, transaction parsing, or access control.
Changed components
bitcoin_client_js/src/lib/appClient.tsInspect captured patch +2 / −2
diff --git a/bitcoin_client_js/src/lib/appClient.ts b/bitcoin_client_js/src/lib/appClient.ts
index bb36977..eee2983 100644
--- a/bitcoin_client_js/src/lib/appClient.ts
+++ b/bitcoin_client_js/src/lib/appClient.ts
@@ -423,11 +423,11 @@ export class AppClient {
let network;
if (appAndVer.name === 'Bitcoin Test') {
network = networks.testnet;
- } else if (appAndVer.name === 'Bitcoin') {
+ } else if (appAndVer.name === 'Bitcoin' || appAndVer.name === 'Bitcoin Recovery') {
network = networks.bitcoin;
} else {
throw new Error(
- `Invalid network: ${appAndVer.name}. Expected 'Bitcoin Test' or 'Bitcoin'.`
+ `Invalid network: ${appAndVer.name}. Expected 'Bitcoin Test', 'Bitcoin' or 'Bitcoin Recovery'.`
);
}
let expression = walletPolicy.descriptorTemplate;
Why this scored 21/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.