@exodus/bitcoin-api 4.2.0 → 4.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,24 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.2.2](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.2.1...@exodus/bitcoin-api@4.2.2) (2025-11-10)
7
+
8
+ **Note:** Version bump only for package @exodus/bitcoin-api
9
+
10
+
11
+
12
+
13
+
14
+ ## [4.2.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.2.0...@exodus/bitcoin-api@4.2.1) (2025-11-03)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+
20
+ * fix: unbreak bitcoin send (#6838)
21
+
22
+
23
+
6
24
  ## [4.2.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.1.6...@exodus/bitcoin-api@4.2.0) (2025-11-03)
7
25
 
8
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-api",
3
- "version": "4.2.0",
3
+ "version": "4.2.2",
4
4
  "description": "Bitcoin transaction and fee monitors, RPC with the blockchain node, other networking code.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -60,5 +60,5 @@
60
60
  "type": "git",
61
61
  "url": "git+https://github.com/ExodusMovement/assets.git"
62
62
  },
63
- "gitHead": "14f8fec5af3540def38f0537859d49509c58d2e7"
63
+ "gitHead": "ba11d8958a6416d939b43f5297930f4069f7daa8"
64
64
  }
@@ -73,16 +73,15 @@ async function prepareTransactionContext({
73
73
  function processAddress({ asset, toAddress }) {
74
74
  let processedAddress = toAddress
75
75
 
76
- if (asset.address.toLegacyAddress) {
77
- processedAddress = asset.address.toLegacyAddress(toAddress)
76
+ if (processedAddress && asset.address.toLegacyAddress) {
77
+ processedAddress = asset.address.toLegacyAddress(processedAddress)
78
78
  }
79
79
 
80
- if (asset.name === 'digibyte' && asset.address.isP2SH2(processedAddress)) {
80
+ if (asset.name === 'digibyte' && processedAddress && asset.address.isP2SH2(processedAddress)) {
81
81
  processedAddress = asset.address.P2SH2ToP2SH(processedAddress)
82
82
  }
83
83
 
84
- const useCashAddress = asset.address.isCashAddress?.(toAddress)
85
-
84
+ const useCashAddress = toAddress ? asset.address.isCashAddress?.(toAddress) : false
86
85
  return { processedAddress, useCashAddress }
87
86
  }
88
87
 
@@ -286,12 +285,7 @@ async function createUnsignedTx({
286
285
  }
287
286
 
288
287
  const getTxHandler = (type) => {
289
- switch (type) {
290
- case 'transfer':
291
- return transferHandler
292
- default:
293
- throw new Error(`Unknown transaction type: ${type}`)
294
- }
288
+ return transferHandler
295
289
  }
296
290
 
297
291
  const transferHandler = {
@@ -429,7 +423,8 @@ const transferHandler = {
429
423
  // Add the keypath of change address to support Trezor detect the change output.
430
424
  // Output is change and does not need approval from user which shows the strange address that user never seen.
431
425
  if (changeAddressKeypath) {
432
- addressPathsMap[context.changeAddress] = changeAddressKeypath
426
+ const changeKey = ourAddress?.address ?? String(ourAddress)
427
+ addressPathsMap[changeKey] = changeAddressKeypath
433
428
  }
434
429
 
435
430
  // Create unsigned transaction