github XRPLF/xrpl.js 1.0.0-beta.2
1.0.0-beta.2 - maxFeeXRP

latest releases: ripple-binary-codec@4.0.1-mpt-beta, xrpl@4.0.1-mpt-beta, ripple-binary-codec@4.0.0-mpt-beta...
pre-release6 years ago

1.0.0-beta.2 (2018-06-08)

Breaking Changes

  • During transaction preparation, there is now a maximum fee. Also, when a transaction is signed, its fee is checked and an error is thrown if the fee exceeds the maximum. The default maxFeeXRP is '2' (2 XRP). Override this value in the RippleAPI constructor.
  • Attempting to prepare a transaction with an exact fee higher than maxFeeXRP causes a ValidationError to be thrown.
  • Attempting to sign a transaction with a fee higher than maxFeeXRP causes a ValidationError to be thrown.
  • The value returned by getFee() is capped at maxFeeXRP.

Other Changes

  • In Transaction Instructions, the maxFee parameter is deprecated. Use the maxFeeXRP parameter in the RippleAPI constructor.

Overview of new fee limit

Most users of ripple-lib do not need to make any code changes to accommodate the new soft limit on fees. The limit is designed to protect against the most severe cases where an unintentionally high fee may be used.

  • When having ripple-lib provide the fee with a prepare* method, a maximum fee of maxFeeXRP (default 2 XRP) applies. You can prepare more economical transactions by setting a lower maxFeeXRP, or support high-priority transactions by setting a higher maxFeeXRP in the RippleAPI constructor.
  • When using sign with a Fee higher than maxFeeXRP, a ValidationError is thrown.

If you have any questions or concerns, please open an issue on GitHub.

Don't miss a new xrpl.js release

NewReleases is sending notifications on new releases.