@exodus/bitcoin-api 4.8.2 → 4.8.3
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 +10 -0
- package/package.json +2 -2
- package/src/tx-log/bitcoin-monitor-scanner.js +20 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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.8.3](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.8.2...@exodus/bitcoin-api@4.8.3) (2025-12-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* fix: keep pending txs until /tx check fails for utxo coins (#7009)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
6
16
|
## [4.8.2](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.8.1...@exodus/bitcoin-api@4.8.2) (2025-12-04)
|
|
7
17
|
|
|
8
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/bitcoin-api",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.3",
|
|
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": "
|
|
63
|
+
"gitHead": "84be327e5d39ecfd0e36abc038f33f7f3b9c33b8"
|
|
64
64
|
}
|
|
@@ -669,7 +669,26 @@ export class BitcoinMonitorScanner {
|
|
|
669
669
|
// Keep new utxos when they intersect with the stored utxos.
|
|
670
670
|
utxoCol = utxoCol.union(currentStoredUtxos).difference(utxosToRemoveCol)
|
|
671
671
|
|
|
672
|
-
|
|
672
|
+
const pendingDropCandidates = Object.values(unconfirmedTxsToCheck)
|
|
673
|
+
const verificationResults = await Promise.all(
|
|
674
|
+
pendingDropCandidates.map(async (tx) => {
|
|
675
|
+
try {
|
|
676
|
+
const txStatus = await insightClient.fetchTx(tx.txId)
|
|
677
|
+
return { tx, shouldDrop: !txStatus }
|
|
678
|
+
} catch (err) {
|
|
679
|
+
console.log(
|
|
680
|
+
`${assetName}: failed to verify pending tx ${tx.txId} before drop check: ${
|
|
681
|
+
err?.message || 'unknown'
|
|
682
|
+
}`
|
|
683
|
+
)
|
|
684
|
+
return { tx, shouldDrop: false }
|
|
685
|
+
}
|
|
686
|
+
})
|
|
687
|
+
)
|
|
688
|
+
|
|
689
|
+
for (const { tx, shouldDrop } of verificationResults) {
|
|
690
|
+
if (!shouldDrop) continue
|
|
691
|
+
|
|
673
692
|
existingTxs.push({ ...tx, dropped: true }) // TODO: this will decrease the chain index, it shouldn't be an issue considering the gap limit
|
|
674
693
|
utxoCol = utxoCol.difference(utxoCol.getTxIdUtxos(tx.txId))
|
|
675
694
|
const utxosToAdd = []
|