@exodus/bitcoin-api 5.0.0 → 5.0.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,25 @@
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
+ ## [5.0.2](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@5.0.0...@exodus/bitcoin-api@5.0.2) (2026-07-16)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * extract broadcast rejection reason from error body message field ([#8396](https://github.com/ExodusMovement/assets/issues/8396)) ([a916a55](https://github.com/ExodusMovement/assets/commit/a916a55af921da5125405a0be8ca43321a3654fd))
12
+ * **send-validation:** improve displayed amount format in validation messages ([#8366](https://github.com/ExodusMovement/assets/issues/8366)) ([940dcd4](https://github.com/ExodusMovement/assets/commit/940dcd4cbe75f4ab48e067bd033afd249caae9a4))
13
+
14
+
15
+
16
+ ## [5.0.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@5.0.0...@exodus/bitcoin-api@5.0.1) (2026-07-11)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **send-validation:** improve displayed amount format in validation messages ([#8366](https://github.com/ExodusMovement/assets/issues/8366)) ([940dcd4](https://github.com/ExodusMovement/assets/commit/940dcd4cbe75f4ab48e067bd033afd249caae9a4))
22
+
23
+
24
+
6
25
  ## [5.0.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.16.1...@exodus/bitcoin-api@5.0.0) (2026-07-10)
7
26
 
8
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-api",
3
- "version": "5.0.0",
3
+ "version": "5.0.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",
@@ -63,5 +63,5 @@
63
63
  "type": "git",
64
64
  "url": "git+https://github.com/ExodusMovement/assets.git"
65
65
  },
66
- "gitHead": "1d7fd9da145bcfeb290441b3b8c72f9f5310eaca"
66
+ "gitHead": "a701d1d9a7fbefc15d3f5b528cd3b2ebba90ee83"
67
67
  }
@@ -30,7 +30,12 @@ const parseBroadcastErrorReason = (data) => {
30
30
 
31
31
  try {
32
32
  const parsed = JSON.parse(data)
33
- return parsed?.error || data
33
+ // Magnifier surfaces bitcoind's rejection reason (e.g.
34
+ // bad-txns-inputs-missingorspent) in fastify's `message` field, while
35
+ // `error` only carries the generic "Internal Server Error". tx-send
36
+ // pattern-matches the reason to classify failures as final and to trigger
37
+ // stale-UTXO repair, so `message` must win.
38
+ return parsed?.message || parsed?.error || data
34
39
  } catch {
35
40
  return data
36
41
  }
@@ -43,7 +43,11 @@ const parseBroadcastErrorReason = (data) => {
43
43
 
44
44
  try {
45
45
  const parsed = JSON.parse(data)
46
- return parsed?.error || data
46
+ // Esplora rejections are usually plain text (handled by the catch), but
47
+ // structured variants put bitcoind's reason in `message`
48
+ // (e.g. {"code":-25,"message":"bad-txns-inputs-missingorspent"}), which
49
+ // tx-send pattern-matches for retry classification and stale-UTXO repair.
50
+ return parsed?.message || parsed?.error || data
47
51
  } catch {
48
52
  return data
49
53
  }
@@ -35,7 +35,12 @@ const notEnoughOutputValidator = createValidator({
35
35
  getMessage: ({ asset, getFiatValue, formatPrice }) => {
36
36
  const dust = getDustValue(asset)
37
37
  const dustValue =
38
- formatPrice(getFiatValue(dust)) + ' (' + dust.toBaseString({ unit: true }) + ')'
38
+ formatPrice(getFiatValue(dust)) +
39
+ ' (' +
40
+ dust.toBaseString({ unit: false }) +
41
+ ' ' +
42
+ asset.displayTicker +
43
+ ')'
39
44
 
40
45
  return t(`Sending ${dustValue} or less isn't supported on the ${asset.displayName} network`)
41
46
  },