edge-currency-plugins 2.5.1 → 2.5.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.
|
@@ -144,6 +144,9 @@ var _utils3 = require('./utils');
|
|
|
144
144
|
const { canReplaceByFee = false } = currencyInfo
|
|
145
145
|
if (!canReplaceByFee) return null
|
|
146
146
|
|
|
147
|
+
// Accelerate for legacy Airbitz wallets is not supported
|
|
148
|
+
if (privateKeyFormat === 'bip32') return null
|
|
149
|
+
|
|
147
150
|
// Get the replaced transaction from the processor:
|
|
148
151
|
const replacedTxid = edgeTx.txid
|
|
149
152
|
const [replacedTx] = await processor.fetchTransactions({
|
|
@@ -13,5 +13,9 @@ var _utils = require('./utils'); var utils = _interopRequireWildcard(_utils);
|
|
|
13
13
|
const fee = Math.ceil(feeRate * utils.transactionBytes(utxos, outputs))
|
|
14
14
|
targets[0].value -= fee
|
|
15
15
|
outputs[0].value -= fee
|
|
16
|
+
|
|
17
|
+
const targetValue = utils.sumOrNaN(targets)
|
|
18
|
+
if (fee > targetValue) return { inputs: utxos, fee, changeUsed: false }
|
|
19
|
+
|
|
16
20
|
return { inputs: utxos, outputs, fee, changeUsed: false }
|
|
17
21
|
} exports.subtractFee = subtractFee;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "edge-currency-plugins",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.3",
|
|
4
4
|
"description": "Edge currency plugins to fetch and process wallet accounts, balances and transactions.",
|
|
5
5
|
"repository": "https://github.com/EdgeApp/edge-currency-plugins",
|
|
6
6
|
"license": "MIT",
|