Compare commits
2 Commits
3b6dd8ba9b
...
55409a960c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55409a960c | ||
|
|
d5aee72bed |
@@ -215,6 +215,27 @@ 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,
|
||||
@@ -228,27 +249,6 @@ 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