Skip to content

Commit 825a0db

Browse files
committed
fix: remove unstrict amount validation
1 parent c141951 commit 825a0db

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

contracts/libraries/Quotes.sol

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,9 @@ library Quotes {
5757
agreedAmount = quote.value + quote.callFee + quote.productFeeAmount + quote.gasFee;
5858

5959

60-
uint delta = agreedAmount / 10000;
61-
// transferred amount should not be lower than (agreed amount - delta),
62-
// where delta is intended to tackle rounding problems
63-
if (agreedAmount - delta > transferredAmount) {
64-
revert AmountTooLow(transferredAmount, agreedAmount - delta);
60+
// transferred amount should not be lower than agreed amount
61+
if (agreedAmount > transferredAmount) {
62+
revert AmountTooLow(transferredAmount, agreedAmount);
6563
}
6664
}
6765

0 commit comments

Comments
 (0)