Update fees API for validation and error checking
Shadouts opened this issue · 1 comments
The validation functions validateFee
, validateFeeRate
, checkFeeError
, checkFeeRateError
, and getFeeErrorMessage
are not ideal in their function or naming. In previous versions, only validateFee
and validateFeeRate
existed. These returned an error message, but fee error types were added in v1.2.0 in order to allow for applications to decide their own path based on an error type. To maintain backward compatibility while providing error information, checkFeeError
, checkFeeRateError
, and getFeeErrorMessage
were added.
For the next major version, the backward compatibility for the validateFee
and validateFeeRate
functions should be eliminated. Maybe they should return a different type the provides error messages, error type, and other info.
Migrated to new repo: unchained-capital/caravan#374