@exodus/bitcoin-plugin 1.13.0 → 1.14.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-plugin",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "description": "Exodus bitcoin-plugin",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -48,5 +48,5 @@
48
48
  "@scure/btc-signer": "^1.1.0",
49
49
  "jest-when": "^3.5.1"
50
50
  },
51
- "gitHead": "9d296fc0875749545bc95b2a976e93739d63553b"
51
+ "gitHead": "3695a5d017d63570eb4d597c2430d1812765f6aa"
52
52
  }
@@ -1,4 +1,5 @@
1
1
  import { WalletAccount } from '@exodus/models'
2
+ import { without } from 'lodash'
2
3
 
3
4
  export const ordinals84 = 'ordinals84'
4
5
  export const ordinals86 = 'ordinals86'
@@ -37,3 +38,10 @@ export const getSupportedPurposes = ({ compatibilityMode, walletAccount }) => {
37
38
 
38
39
  return [84, 86, 44]
39
40
  }
41
+
42
+ export const createGetSupportedPurposes = ({ omitPurposes = [] } = {}) => {
43
+ return ({ compatibilityMode, walletAccount }) => {
44
+ const purposes = getSupportedPurposes({ compatibilityMode, walletAccount })
45
+ return without(purposes, ...omitPurposes)
46
+ }
47
+ }
@@ -36,7 +36,7 @@ import { brc20BalancesAndFeeAdapterFactory } from './ordinals/brc-20-balances-an
36
36
  import { parseCurrency } from '@exodus/bitcoin-api/src/fee/fee-utils'
37
37
  import { inscriptionsServiceFactory } from './ordinals/inscriptions-service'
38
38
  import { tickInscriptionIdIndexerFactory } from './ordinals/tick-inscription-id-indexer'
39
- import { getDefaultAddressPath, getSupportedPurposes } from './compatibility-modes'
39
+ import { createGetSupportedPurposes, getDefaultAddressPath } from './compatibility-modes'
40
40
 
41
41
  const DEFAULT_TICKS_BETWEEN_BRC20_FETCHES = 30
42
42
 
@@ -58,6 +58,7 @@ export const createBitcoinAssetFactory =
58
58
  refreshGapLimit = 25,
59
59
  feeDataCustomValues,
60
60
  utxosDescendingOrder = false,
61
+ omitSupportedPurposes = [],
61
62
  } = Object.create(null),
62
63
  } = Object.create(null)
63
64
  ) => {
@@ -318,7 +319,7 @@ export const createBitcoinAssetFactory =
318
319
  allowedPurposes,
319
320
  allowedChainIndices: [0, 1, 2],
320
321
  }),
321
- getSupportedPurposes,
322
+ getSupportedPurposes: createGetSupportedPurposes({ omitPurposes: omitSupportedPurposes }),
322
323
  hasFeature: (feature) => !!features[feature], // @deprecated use api.features instead
323
324
  createAccountState: () => accountStateClass,
324
325
  parseUnsignedTx,