Compare commits
2 Commits
55409a960c
...
3b6dd8ba9b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b6dd8ba9b | ||
|
|
e412897f11 |
@@ -215,27 +215,6 @@ contract P2PIX is
|
||||
mapLocks[cCounter].expirationBlock >= block.number
|
||||
) revert NotExpired();
|
||||
|
||||
if (merkleProof.length != 0) {
|
||||
merkleVerify(
|
||||
merkleProof,
|
||||
sellerAllowList[k],
|
||||
msg.sender
|
||||
);
|
||||
} else if (_amount > 1e2 ether) {
|
||||
|
||||
uint256 userCredit = userRecord[
|
||||
_castAddrToKey(msg.sender)
|
||||
];
|
||||
|
||||
uint256 spendLimit;
|
||||
(spendLimit) = _limiter(userCredit / WAD);
|
||||
|
||||
if (
|
||||
_amount > (spendLimit * WAD) ||
|
||||
_amount > 1e6 ether
|
||||
) revert AmountNotAllowed();
|
||||
}
|
||||
|
||||
DT.Lock memory l = DT.Lock(
|
||||
k,
|
||||
cCounter,
|
||||
@@ -249,6 +228,27 @@ contract P2PIX is
|
||||
t
|
||||
);
|
||||
|
||||
if (merkleProof.length != 0) {
|
||||
merkleVerify(
|
||||
merkleProof,
|
||||
sellerAllowList[k],
|
||||
msg.sender
|
||||
);
|
||||
} else if (l.amount > 1e2 ether) {
|
||||
|
||||
uint256 userCredit = userRecord[
|
||||
_castAddrToKey(msg.sender)
|
||||
];
|
||||
|
||||
uint256 spendLimit;
|
||||
(spendLimit) = _limiter(userCredit / WAD);
|
||||
|
||||
if (
|
||||
l.amount > (spendLimit * WAD) ||
|
||||
l.amount > 1e6 ether
|
||||
) revert AmountNotAllowed();
|
||||
}
|
||||
|
||||
_addLock(bal, _amount, cCounter, l, t, k);
|
||||
|
||||
lockCounter++;
|
||||
|
||||
Reference in New Issue
Block a user