Skip to content

Commit

Permalink
fix: new one
Browse files Browse the repository at this point in the history
  • Loading branch information
olehbairak committed Feb 6, 2024
1 parent 08919a9 commit 84dbc4c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/integration-tests/tests/api/accounts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe("API module: Account", () => {
await helper.retryTestAction(async () => {
const blocks = await request(environment.blockExplorerAPI).get("/blocks");
const blockNumber = blocks.body.items[0].number;
apiRoute = `/api?module=account&action=txlist&page=1&offset=10&sort=desc&endblock${blockNumber}&startblock=0&address=${Wallets.richWalletAddress}`;
apiRoute = `/api?module=account&action=txlist&page=1&offset=10&sort=desc&endblock=${blockNumber}&startblock=0&address=${Wallets.richWalletAddress}`;
response = await helper.performGETrequest(apiRoute);

expect(response.status).toBe(200);
Expand Down Expand Up @@ -119,7 +119,7 @@ describe("API module: Account", () => {
await helper.retryTestAction(async () => {
const blocks = await request(environment.blockExplorerAPI).get("/blocks");
const blockNumber = blocks.body.items[0].number;
apiRoute = `/api?module=account&action=txlistinternal&page=1&offset=10&sort=desc&endblock${blockNumber}&startblock=0&address=${Wallets.richWalletAddress}`;
apiRoute = `/api?module=account&action=txlistinternal&page=1&offset=10&sort=desc&endblock=${blockNumber}&startblock=0&address=${Wallets.richWalletAddress}`;
response = await helper.performGETrequest(apiRoute);

expect(response.status).toBe(200);
Expand Down Expand Up @@ -176,8 +176,9 @@ describe("API module: Account", () => {
await helper.retryTestAction(async () => {
const blocks = await request(environment.blockExplorerAPI).get("/blocks");
const blockNumber = blocks.body.items[0].number;
apiRoute = `/api?module=account&action=tokentx&page=1&offset=10&sort=desc&endblock${blockNumber}&startblock=0&contractaddress=${Token.ETHER_ERC20_Address}&address=${Wallets.richWalletAddress}`;
apiRoute = `/api?module=account&action=tokentx&page=1&offset=10&sort=desc&endblock=${blockNumber}&startblock=0&contractaddress=${Token.ETHER_ERC20_Address}&address=${Wallets.richWalletAddress}`;
response = await helper.performGETrequest(apiRoute);
console.log(apiRoute);

expect(response.status).toBe(200);
expect(response.body).toStrictEqual(expect.objectContaining({ status: "1" }));
Expand Down Expand Up @@ -216,7 +217,7 @@ describe("API module: Account", () => {
const blockNumber = blocks.body.items[0].number;
const nftAddress = await helper.getStringFromFile(bufferFile + Buffer.NFTtoL2);
console.log(nftAddress);
apiRoute = `/api?module=account&action=tokennfttx&page=1&offset=10&sort=desc&endblock${blockNumber}&startblock=0&contractaddress=${nftAddress}&address=${nftAddress}`;
apiRoute = `/api?module=account&action=tokennfttx&page=1&offset=10&sort=desc&endblock=${blockNumber}&startblock=0&contractaddress=${nftAddress}&address=${nftAddress}`;
response = await helper.performGETrequest(apiRoute);

expect(response.status).toBe(200);
Expand Down

0 comments on commit 84dbc4c

Please sign in to comment.