@exodus/bitcoin-api 2.3.0 → 2.3.1
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 +2 -2
- package/src/fee/can-bump-tx.js +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/bitcoin-api",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "Exodus bitcoin-api",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"@exodus/bitcoin-meta": "^1.0.0",
|
|
41
41
|
"@noble/secp256k1": "~1.5.3"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "f8d65434ff4e35d66c1da37051f2dae30da419b7"
|
|
44
44
|
}
|
package/src/fee/can-bump-tx.js
CHANGED
|
@@ -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
|
|