Skip to content

Commit

Permalink
Fix tests for finding 7
Browse files Browse the repository at this point in the history
  • Loading branch information
lastperson committed Sep 9, 2024
1 parent 15a1c1c commit 7921f5e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions test/handlers/erc20/deposit.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ contract("ERC20Handler - [Deposit ERC20]", async (accounts) => {

it(`When non-contract addresses are whitelisted in the handler,
deposits which the addresses are set as a token address will be failed`, async () => {
const ZERO_Address = "0x0000000000000000000000000000000000000000";
const NonContract_Address = "0x0000000000000000000000000000000000001111";
const EOA_Address = accounts[1];
const resourceID_ZERO_Address = Helpers.createResourceID(
ZERO_Address,
const resourceID_NonContract_Address = Helpers.createResourceID(
NonContract_Address,
originDomainID
);
const resourceID_EOA_Address = Helpers.createResourceID(
Expand All @@ -164,8 +164,8 @@ contract("ERC20Handler - [Deposit ERC20]", async (accounts) => {
);
await BridgeInstance.adminSetResource(
ERC20HandlerInstance.address,
resourceID_ZERO_Address,
ZERO_Address,
resourceID_NonContract_Address,
NonContract_Address,
emptySetResourceData
);
await BridgeInstance.adminSetResource(
Expand All @@ -181,7 +181,7 @@ contract("ERC20Handler - [Deposit ERC20]", async (accounts) => {
await Helpers.reverts(
BridgeInstance.deposit(
destinationDomainID,
resourceID_ZERO_Address,
resourceID_NonContract_Address,
Helpers.createERCDepositData(
tokenAmount,
lenRecipientAddress,
Expand Down
12 changes: 6 additions & 6 deletions test/handlers/xc20/deposit.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ contract("XC20Handler - [Deposit ERC20]", async (accounts) => {

it(`When non-contract addresses are whitelisted in the handler,
deposits which the addresses are set as a token address will be failed`, async () => {
const ZERO_Address = "0x0000000000000000000000000000000000000000";
const NonContract_Address = "0x0000000000000000000000000000000000001111";
const EOA_Address = accounts[1];
const resourceID_ZERO_Address = Helpers.createResourceID(
ZERO_Address,
const resourceID_NonContract_Address = Helpers.createResourceID(
NonContract_Address,
originDomainID
);
const resourceID_EOA_Address = Helpers.createResourceID(
Expand All @@ -161,8 +161,8 @@ contract("XC20Handler - [Deposit ERC20]", async (accounts) => {
);
await BridgeInstance.adminSetResource(
XC20HandlerInstance.address,
resourceID_ZERO_Address,
ZERO_Address,
resourceID_NonContract_Address,
NonContract_Address,
emptySetResourceData
);
await BridgeInstance.adminSetResource(
Expand All @@ -178,7 +178,7 @@ contract("XC20Handler - [Deposit ERC20]", async (accounts) => {
await Helpers.reverts(
BridgeInstance.deposit(
destinationDomainID,
resourceID_ZERO_Address,
resourceID_NonContract_Address,
Helpers.createERCDepositData(
tokenAmount,
lenRecipientAddress,
Expand Down

0 comments on commit 7921f5e

Please sign in to comment.