Merge pull request #1688 from mempool/simon/mempool-tx-fee-bug

Fixes broken fee rate calculation for mempool transactions
This commit is contained in:
wiz 2022-05-20 21:03:34 +09:00 committed by GitHub
commit 55f2cf06af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -192,12 +192,9 @@ class BitcoinApi implements AbstractBitcoinApi {
}
if (addPrevout) {
if (transaction.confirmations) {
esploraTransaction = await this.$calculateFeeFromInputs(esploraTransaction);
} else {
esploraTransaction = await this.$appendMempoolFeeData(esploraTransaction);
esploraTransaction = await this.$calculateFeeFromInputs(esploraTransaction);
}
esploraTransaction = await this.$calculateFeeFromInputs(esploraTransaction);
} else if (!transaction.confirmations) {
esploraTransaction = await this.$appendMempoolFeeData(esploraTransaction);
}
return esploraTransaction;