line 1004:
// if no change output is set, fees should equal all the unspent amount
if (!this._changeScript) {
return this._getUnspentValue();
}
Comment for function says estimate fee, but if inputs=outputs it will return 0 instead of estimating. And even if they are
not equal it will return 'all the unspent amount' instead of estimating an appropriate fee.
So function does not do what it says it will.
https://github.com/bitpay/bitcore/blob/7dd58ea888105ca2d0ab95e0bad3c68a923640d7/packages/bitcore-lib/lib/transaction/transaction.js#L992
line 1004: // if no change output is set, fees should equal all the unspent amount if (!this._changeScript) { return this._getUnspentValue(); }
Comment for function says estimate fee, but if inputs=outputs it will return 0 instead of estimating. And even if they are not equal it will return 'all the unspent amount' instead of estimating an appropriate fee. So function does not do what it says it will.
This problem is the same for dogecoin https://github.com/bitpay/bitcore/blob/master/packages/bitcore-lib-doge/lib/transaction/transaction.js#L999