@exodus/bitcoin-api 2.17.0 → 2.18.0

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
+ ## [2.18.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.17.1...@exodus/bitcoin-api@2.18.0) (2024-06-13)
7
+
8
+
9
+ ### Features
10
+
11
+ * Remove ordinals wallet BTC from total balance ([#2524](https://github.com/ExodusMovement/assets/issues/2524)) ([3674bb1](https://github.com/ExodusMovement/assets/commit/3674bb1852aa50f8a8195da276a5b106d3ae1606))
12
+
13
+
14
+
15
+ ## [2.17.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.17.0...@exodus/bitcoin-api@2.17.1) (2024-06-12)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * support signing taproot scripts from xverse payment addresses ([#2548](https://github.com/ExodusMovement/assets/issues/2548)) ([0597ba2](https://github.com/ExodusMovement/assets/commit/0597ba27a83071a8a0be41d44d8c0ca32cc5e6f6))
21
+
22
+
23
+
6
24
  ## [2.17.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.16.0...@exodus/bitcoin-api@2.17.0) (2024-06-12)
7
25
 
8
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-api",
3
- "version": "2.17.0",
3
+ "version": "2.18.0",
4
4
  "description": "Exodus bitcoin-api",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -67,5 +67,5 @@
67
67
  "type": "git",
68
68
  "url": "git+https://github.com/ExodusMovement/assets.git"
69
69
  },
70
- "gitHead": "f815266bc50384027d966f37e44e9166c87ca938"
70
+ "gitHead": "b2c0bfc107ce9686d2f9a91386ffe2f43e48ed2d"
71
71
  }
package/src/balances.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import assert from 'minimalistic-assert'
2
- import { getOrdinalsUtxos, getUtxos } from './utxos-utils'
2
+ import { getUtxos } from './utxos-utils'
3
3
 
4
4
  // known issue!! fee data is static here!
5
5
  // Hydra's balances's module does not provide it when calling asset.api.getBalances
@@ -14,10 +14,7 @@ export const getBalancesFactory = ({ feeData, getSpendableBalance, ordinalsEnabl
14
14
  assert(accountState, 'accountState is required')
15
15
  assert(txLog, 'txLog is required')
16
16
  const utxos = getUtxos({ asset, accountState })
17
- const unknownBalance = ordinalsEnabled
18
- ? getOrdinalsUtxos({ asset, accountState }).filter((utxo) => !utxo.inscriptions?.length).value
19
- : undefined
20
- const balance = ordinalsEnabled ? utxos.value.add(unknownBalance) : utxos.value
17
+ const balance = utxos.value
21
18
  const spendableBalance = getSpendableBalance({
22
19
  asset,
23
20
  accountState,
@@ -44,8 +44,8 @@ export function createSignWithWallet({
44
44
  : [sigHash, Transaction.SIGHASH_ALL]
45
45
  const { key, purpose, keyId, publicKey } = await getKeyWithMetadata(address)
46
46
 
47
- const isP2SH = purpose === 49
48
47
  const hasTapLeafScript = input.tapLeafScript && input.tapLeafScript.length > 0
48
+ const isP2SH = purpose === 49 && !hasTapLeafScript
49
49
  const isTaprootKeySpend = isTaprootPurpose(purpose) && !hasTapLeafScript
50
50
 
51
51
  if (isP2SH) {