|
35 | 35 | #include <xrpl/protocol/PublicKey.h> |
36 | 36 | #include <xrpl/protocol/SField.h> |
37 | 37 | #include <xrpl/protocol/STAmount.h> |
| 38 | +#include <xrpl/protocol/STNumber.h> |
38 | 39 | #include <xrpl/protocol/STObject.h> |
39 | 40 | #include <xrpl/protocol/STXChainBridge.h> |
40 | 41 | #include <xrpl/protocol/TER.h> |
@@ -68,11 +69,11 @@ LoanBrokerSet::doPreflight(PreflightContext const& ctx) |
68 | 69 | auto const& tx = ctx.tx; |
69 | 70 | if (!validDataLength(tx[~sfData], maxDataPayloadLength)) |
70 | 71 | return temINVALID; |
71 | | - if (!validNumericRange(tx[~sfManagementFeeRate], 0, maxFeeRate)) |
| 72 | + if (!validNumericRange(tx[~sfManagementFeeRate], maxFeeRate)) |
72 | 73 | return temINVALID; |
73 | | - if (!validNumericRange(tx[~sfCoverRateMinimum], 0, maxCoverRate)) |
| 74 | + if (!validNumericRange(tx[~sfCoverRateMinimum], maxCoverRate)) |
74 | 75 | return temINVALID; |
75 | | - if (!validNumericRange(tx[~sfCoverRateLiquidation], 0, maxCoverRate)) |
| 76 | + if (!validNumericRange(tx[~sfCoverRateLiquidation], maxCoverRate)) |
76 | 77 | return temINVALID; |
77 | 78 |
|
78 | 79 | if (tx.isFieldPresent(sfLoanBrokerID)) |
@@ -187,7 +188,7 @@ LoanBrokerSet::doApply() |
187 | 188 | broker->at(sfData) = *data; |
188 | 189 | if (auto const rate = tx[~sfManagementFeeRate]) |
189 | 190 | broker->at(sfManagementFeeRate) = *rate; |
190 | | - if (auto const debtMax = tx[~sfDebtMaximum]; debtMax && *debtMax) |
| 191 | + if (auto const debtMax = tx[~sfDebtMaximum]; debtMax) |
191 | 192 | broker->at(sfDebtMaximum) = *debtMax; |
192 | 193 | if (auto const coverMin = tx[~sfCoverRateMinimum]) |
193 | 194 | broker->at(sfCoverRateMinimum) = *coverMin; |
|
0 commit comments