Skip to content

Commit

Permalink
Reuse recipient address
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetrun5 committed Sep 27, 2023
1 parent d09d1f7 commit d84b163
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/handlers/fee/handlerRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ contract("FeeHandlerRouter", async (accounts) => {
const whitelistAddress = accounts[2];
const nonWhitelistAddress = accounts[3];
const bridgeAddress = accounts[4];
const recipient = accounts[5];

const assertOnlyAdmin = (method, ...params) => {
return TruffleAssert.reverts(
Expand Down Expand Up @@ -125,7 +126,7 @@ contract("FeeHandlerRouter", async (accounts) => {
);
await BasicFeeHandlerInstance.changeFee(Ethers.utils.parseEther("0.5"));

const depositData = Helpers.createERCDepositData(100, 20, accounts[4]);
const depositData = Helpers.createERCDepositData(100, 20, recipient);
let res = await FeeHandlerRouterInstance.calculateFee.call(
whitelistAddress,
originDomainID,
Expand Down Expand Up @@ -158,7 +159,7 @@ contract("FeeHandlerRouter", async (accounts) => {
);
await BasicFeeHandlerInstance.changeFee(Ethers.utils.parseEther("0.5"));

const depositData = Helpers.createERCDepositData(100, 20, accounts[4]);
const depositData = Helpers.createERCDepositData(100, 20, recipient);
await Helpers.expectToRevertWithCustomError(
FeeHandlerRouterInstance.collectFee(
whitelistAddress,
Expand Down Expand Up @@ -202,7 +203,7 @@ contract("FeeHandlerRouter", async (accounts) => {
);
await BasicFeeHandlerInstance.changeFee(Ethers.utils.parseEther("0.5"));

const depositData = Helpers.createERCDepositData(100, 20, accounts[4]);
const depositData = Helpers.createERCDepositData(100, 20, recipient);
await TruffleAssert.passes(
FeeHandlerRouterInstance.collectFee(
whitelistAddress,
Expand Down

0 comments on commit d84b163

Please sign in to comment.