HOTFIX: Adjusted minimum spend limit
This commit is contained in:
parent
0b0f2a667f
commit
122044a1e5
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"_format": "hh-sol-dbg-1",
|
||||
"buildInfo": "../../build-info/6ebe7657303cd8d4b91c2ac52d990bb5.json"
|
||||
"buildInfo": "../../build-info/afbde6718590f5775bc92171f5c6c7f4.json"
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -199,7 +199,7 @@ contract P2PIX is
|
|||
// Halt execution and output `lockID`.
|
||||
return lockID;
|
||||
} else {
|
||||
if (l.amount <= 1e2) {
|
||||
if (l.amount <= 100 ether) {
|
||||
_addLock(lockID, l, d);
|
||||
// Halt execution and output `lockID`.
|
||||
return lockID;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -585,10 +585,10 @@ describe("P2PIX", () => {
|
|||
);
|
||||
});
|
||||
it("should revert if msg.sender does not have enough credit in his spend limit", async () => {
|
||||
await erc20.approve(p2pix.address, price);
|
||||
await erc20.approve(p2pix.address, price.mul(BigNumber.from('3')));
|
||||
await p2pix.deposit(
|
||||
erc20.address,
|
||||
price,
|
||||
price.mul(BigNumber.from('3')),
|
||||
"pixTarget",
|
||||
merkleRoot,
|
||||
);
|
||||
|
@ -599,7 +599,7 @@ describe("P2PIX", () => {
|
|||
acc02.address,
|
||||
acc03.address,
|
||||
0,
|
||||
price,
|
||||
price.mul(BigNumber.from('2')),
|
||||
[],
|
||||
[],
|
||||
);
|
||||
|
@ -674,13 +674,13 @@ describe("P2PIX", () => {
|
|||
acc02.address,
|
||||
acc03.address,
|
||||
0,
|
||||
100,
|
||||
price,
|
||||
[],
|
||||
[],
|
||||
);
|
||||
const lockID = ethers.utils.solidityKeccak256(
|
||||
["uint256", "uint256", "address"],
|
||||
[0, 100, acc02.address],
|
||||
[0, price, acc02.address],
|
||||
);
|
||||
const storage: Lock = await p2pix.callStatic.mapLocks(
|
||||
lockID,
|
||||
|
@ -695,7 +695,7 @@ describe("P2PIX", () => {
|
|||
ethers.constants.Zero,
|
||||
);
|
||||
expect(storage.amount).to.eq(
|
||||
ethers.BigNumber.from(100),
|
||||
price
|
||||
);
|
||||
expect(storage.expirationBlock).to.eq(expiration);
|
||||
expect(storage.buyerAddress).to.eq(acc02.address);
|
||||
|
|
Loading…
Reference in New Issue