@exodus/bitcoin-api 2.3.0 → 2.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-api",
3
- "version": "2.3.0",
3
+ "version": "2.3.2",
4
4
  "description": "Exodus bitcoin-api",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -37,8 +37,8 @@
37
37
  "devDependencies": {
38
38
  "@exodus/bcash-meta": "^1.0.0",
39
39
  "@exodus/bip-schnorr": "0.6.6-fork-1",
40
- "@exodus/bitcoin-meta": "^1.0.0",
40
+ "@exodus/bitcoin-meta": "^1.0.1",
41
41
  "@noble/secp256k1": "~1.5.3"
42
42
  },
43
- "gitHead": "e2dd97caae4a23757f38f2156450f17d86fdce34"
43
+ "gitHead": "5bc09581d58d29a80871f4fbb189ff2dcf389b96"
44
44
  }
@@ -78,7 +78,7 @@ const _canBumpTx = ({
78
78
  }
79
79
 
80
80
  if (bumpTx) {
81
- const { replaceTx } = selectUtxos({
81
+ const { replaceTx, fee } = selectUtxos({
82
82
  asset,
83
83
  usableUtxos,
84
84
  replaceableTxs: [bumpTx],
@@ -87,7 +87,7 @@ const _canBumpTx = ({
87
87
  getFeeEstimator,
88
88
  allowUnconfirmedRbfEnabledUtxos,
89
89
  })
90
- if (replaceTx) return { bumpType: BumpType.RBF }
90
+ if (replaceTx) return { bumpType: BumpType.RBF, bumpFee: fee.sub(replaceTx.feeAmount) }
91
91
  }
92
92
 
93
93
  const { fee } = selectUtxos({
@@ -108,8 +108,9 @@ const validateIsNumber = (number, name) => {
108
108
  return number
109
109
  }
110
110
 
111
- const wrapResponseToObject = ({ bumpType = BumpType.NONE, errorMessage = null } = {}) => ({
111
+ const wrapResponseToObject = ({ bumpType = BumpType.NONE, bumpFee, errorMessage = null } = {}) => ({
112
112
  bumpType,
113
+ bumpFee,
113
114
  errorMessage,
114
115
  })
115
116
 
@@ -424,6 +424,7 @@ export class BitcoinMonitorScanner {
424
424
 
425
425
  if (isSent) {
426
426
  txLogItem.feeAmount = currency.defaultUnit(txItem.fees || 0)
427
+ txLogItem.feeCoinName = assetName
427
428
  if (isSelfSent) {
428
429
  txLogItem.selfSend = true
429
430
  txLogItem.coinAmount = currency.ZERO
@@ -357,7 +357,9 @@ export const createAndBroadcastTXFactory = ({
357
357
  txId,
358
358
  confirmations: 0,
359
359
  coinAmount: selfSend ? currency.ZERO : totalAmount.abs().negate(),
360
+ coinName: assetName,
360
361
  feeAmount: fee,
362
+ feeCoinName: assetName,
361
363
  selfSend,
362
364
  data: {
363
365
  sent: selfSend ? [] : receivers,