Skip to content

Commit

Permalink
Test file rename
Browse files Browse the repository at this point in the history
  • Loading branch information
cristovaoth committed Oct 30, 2023
1 parent f55d00d commit 6e8500e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions packages/evm/test/operators/28WithinAllowance.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ describe("Operator - WithinAllowance", async () => {
allowanceKey: string,
{
balance,
maxBalance,
maxRefill,
refill,
period,
timestamp,
}: {
balance: BigNumberish;
maxBalance?: BigNumberish;
maxRefill?: BigNumberish;
refill: BigNumberish;
period: BigNumberish;
timestamp: BigNumberish;
Expand All @@ -29,7 +29,7 @@ describe("Operator - WithinAllowance", async () => {
return roles.setAllowance(
allowanceKey,
balance,
maxBalance || 0,
maxRefill || 0,
refill,
period,
timestamp
Expand Down Expand Up @@ -194,7 +194,7 @@ describe("Operator - WithinAllowance", async () => {
.to.be.revertedWithCustomError(roles, `ConditionViolation`)
.withArgs(PermissionCheckerStatus.AllowanceExceeded, allowanceKey);
});
it("passes a check with balance from refill and bellow maxBalance", async () => {
it("passes a check with balance from refill and bellow maxRefill", async () => {
const { owner, roles, scopeFunction, invoke } = await loadFixture(
setupOneParamStatic
);
Expand All @@ -221,7 +221,7 @@ describe("Operator - WithinAllowance", async () => {
const timestamp = await time.latest();
await setAllowance(await roles.connect(owner), allowanceKey, {
balance: 0,
maxBalance: 1000,
maxRefill: 1000,
period: interval,
refill: 9999999,
timestamp: timestamp - interval * 10,
Expand All @@ -233,7 +233,7 @@ describe("Operator - WithinAllowance", async () => {

await expect(invoke(1000)).to.not.be.reverted;
});
it("fails a check with balance from refill but capped by maxBalance", async () => {
it("fails a check with balance from refill but capped by maxRefill", async () => {
const { owner, roles, scopeFunction, invoke } = await loadFixture(
setupOneParamStatic
);
Expand All @@ -258,7 +258,7 @@ describe("Operator - WithinAllowance", async () => {
const timestamp = await time.latest();
await setAllowance(await roles.connect(owner), allowanceKey, {
balance: 0,
maxBalance: 9000,
maxRefill: 9000,
period: 1000,
refill: 10000,
timestamp: timestamp - 5000,
Expand Down
6 changes: 3 additions & 3 deletions packages/evm/test/operators/29EtherWithinAllowance.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@ describe("Operator - EtherWithinAllowance", async () => {
async function setAllowance({
key,
balance,
maxBalance,
maxRefill,
refill,
period,
timestamp,
}: {
key: string;
balance: BigNumberish;
maxBalance?: BigNumberish;
maxRefill?: BigNumberish;
refill: BigNumberish;
period: BigNumberish;
timestamp: BigNumberish;
}) {
await roles
.connect(owner)
.setAllowance(key, balance, maxBalance || 0, refill, period, timestamp);
.setAllowance(key, balance, maxRefill || 0, refill, period, timestamp);
}

await roles.connect(owner).assignRoles(invoker.address, [ROLE_KEY], [true]);
Expand Down
6 changes: 3 additions & 3 deletions packages/evm/test/operators/30CallWithinAllowance.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@ describe("Operator - CallWithinAllowance", async () => {
async function setAllowance({
key,
balance,
maxBalance,
maxRefill,
refill,
period,
timestamp,
}: {
key: string;
balance: BigNumberish;
maxBalance?: BigNumberish;
maxRefill?: BigNumberish;
refill: BigNumberish;
period: BigNumberish;
timestamp: BigNumberish;
}) {
await roles
.connect(owner)
.setAllowance(key, balance, maxBalance || 0, refill, period, timestamp);
.setAllowance(key, balance, maxRefill || 0, refill, period, timestamp);
}

await roles.connect(owner).assignRoles(invoker.address, [ROLE_KEY], [true]);
Expand Down

0 comments on commit 6e8500e

Please sign in to comment.