@atomiqlabs/lp-lib 14.0.0-dev.26 → 14.0.0-dev.28
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.
|
@@ -404,7 +404,7 @@ class SpvVaultSwapHandler extends SwapHandler_1.SwapHandler {
|
|
|
404
404
|
msg: "One or more PSBT inputs not finalized!"
|
|
405
405
|
};
|
|
406
406
|
const effectiveFeeRate = await this.bitcoinRpc.getEffectiveFeeRate(await this.bitcoin.parsePsbt(signedTx));
|
|
407
|
-
if (effectiveFeeRate.feeRate < swap.btcFeeRate)
|
|
407
|
+
if (effectiveFeeRate.feeRate < 1 || Math.round(effectiveFeeRate.feeRate) < swap.btcFeeRate)
|
|
408
408
|
throw {
|
|
409
409
|
code: 20511,
|
|
410
410
|
msg: "Bitcoin transaction fee too low, expected minimum: " + swap.btcFeeRate + " adjusted effective fee rate: " + effectiveFeeRate.feeRate
|
package/package.json
CHANGED
|
@@ -538,7 +538,7 @@ export class SpvVaultSwapHandler extends SwapHandler<SpvVaultSwap, SpvVaultSwapS
|
|
|
538
538
|
};
|
|
539
539
|
|
|
540
540
|
const effectiveFeeRate = await this.bitcoinRpc.getEffectiveFeeRate(await this.bitcoin.parsePsbt(signedTx));
|
|
541
|
-
if(effectiveFeeRate.feeRate < swap.btcFeeRate) throw {
|
|
541
|
+
if(effectiveFeeRate.feeRate < 1 || Math.round(effectiveFeeRate.feeRate) < swap.btcFeeRate) throw {
|
|
542
542
|
code: 20511,
|
|
543
543
|
msg: "Bitcoin transaction fee too low, expected minimum: "+swap.btcFeeRate+" adjusted effective fee rate: "+effectiveFeeRate.feeRate
|
|
544
544
|
}
|