Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pierregee committed Nov 8, 2023
1 parent 207daac commit 4081d0a
Show file tree
Hide file tree
Showing 86 changed files with 214 additions and 217 deletions.
4 changes: 0 additions & 4 deletions apps/server/src/app.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,4 @@ import { AppService } from './app.service';
export class AppController {
constructor(private readonly appService: AppService) {}

@Get()
getHello(): string {
return this.appService.getHello();
}
}
3 changes: 0 additions & 3 deletions apps/server/src/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@ import { Injectable } from '@nestjs/common';

@Injectable()
export class AppService {
getHello(): string {
return 'Hello World!';
}
}
6 changes: 3 additions & 3 deletions apps/web/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ module.exports = defineConfig({
},
baseUrl: "http://localhost:3000",
specPattern: "cypress/e2e/**/*.{js,jsx,ts,tsx}",
excludeSpecPattern:[
excludeSpecPattern: [
"cypress/e2e/pages/transaction/[tid].spec.ts",
"cypress/e2e/pages/transaction/TokenMinting.spec.ts"
]
"cypress/e2e/pages/transaction/TokenMinting.spec.ts",
],
},
});
6 changes: 3 additions & 3 deletions apps/web/cypress/e2e/pages/transaction/TokenMinting.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ context("/tx/[tid] on macbook-16", () => {
it("should display transaction details", () => {
cy.findByTestId("tx-hash").should("have.text", txHash);
cy.findByTestId("transaction-timestamp").contains(
"(07-26-2023 09:31:33 AM +UTC)"
"(07-26-2023 09:31:33 AM +UTC)",
);
cy.findByTestId("transaction-block").should("have.text", "89946");
cy.findByTestId("transaction-block")
Expand All @@ -45,7 +45,7 @@ context("/tx/[tid] on macbook-16", () => {
// Interacted with contract
cy.findByTestId("interacted-with-contract-(to)-title").should(
"have.text",
"Interacted with contract (To)"
"Interacted with contract (To)",
);
cy.findByTestId("transaction-details-to")
.should("have.attr", "href")
Expand All @@ -64,7 +64,7 @@ context("/tx/[tid] on macbook-16", () => {
cy.findByTestId("for-token-container").contains("For: ");
cy.findByTestId("token-transferred-for").should(
"have.text",
"100,000.00000000"
"100,000.00000000",
);
cy.findAllByTestId("token-transferred-for-symbol")
.should("contain.text", "fDUSD")
Expand Down
32 changes: 16 additions & 16 deletions apps/web/cypress/e2e/pages/transaction/[tid].spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ context("/tx/[tid] on macbook-16", () => {

it("should display transaction timestamp", () => {
cy.findByTestId("transaction-timestamp").contains(
"(06-16-2023 04:57:05 AM +UTC)"
"(06-16-2023 04:57:05 AM +UTC)",
);
});

Expand All @@ -45,14 +45,14 @@ context("/tx/[tid] on macbook-16", () => {
cy.findByTestId("transaction-block").click();
cy.location("href").should(
"eq",
`${Cypress.config().baseUrl}/block/${block}`
`${Cypress.config().baseUrl}/block/${block}`,
);
});

it("should have number of block confirmations", () => {
cy.findByTestId("transaction-confimations-title").should(
"have.text",
"Confirmation"
"Confirmation",
);
cy.findByTestId("transaction-confirmations")
.should("be.visible")
Expand All @@ -67,7 +67,7 @@ context("/tx/[tid] on macbook-16", () => {
it("should display transaction type and status", () => {
cy.findByTestId("transaction-type-title").should(
"have.text",
"Transaction type"
"Transaction type",
);
cy.findByTestId("transaction-type").should("have.text", "Contract call");
cy.findByTestId("transaction-status-title").should("have.text", "Status");
Expand All @@ -79,7 +79,7 @@ context("/tx/[tid] on macbook-16", () => {
cy.findByTestId("transaction-amount").contains("0.30000000 DFI");
cy.findByTestId("transaction-fee-title").should(
"have.text",
"Transaction fee"
"Transaction fee",
);
cy.findByTestId("transaction-fee").should("have.text", "0.00028350 DFI");
});
Expand Down Expand Up @@ -109,15 +109,15 @@ context("/tx/[tid] on macbook-16", () => {
cy.findByTestId("gas-limit").should("have.text", "21,000");
cy.findByTestId("gas-used-by-txn-title").should(
"have.text",
"Gas used by txn"
"Gas used by txn",
);
cy.findByTestId("gas-used").should("have.text", "21,000");
cy.findByTestId("gas-used-percentage").should("have.text", "100.00%");
cy.findByTestId("nonce-title").should("have.text", "Nonce");
cy.findByTestId("nonce").should("have.text", "2");
cy.findByTestId("position-in-block-title").should(
"have.text",
"Position in block"
"Position in block",
);
cy.findByTestId("position").should("have.text", "1");
cy.findByTestId("desktop-tooltip-gas-price").should("be.visible");
Expand All @@ -130,7 +130,7 @@ context("/tx/[tid] on macbook-16", () => {
it("should display raw input", () => {
cy.findByTestId("transaction-raw-input-title").should(
"have.text",
"Raw input"
"Raw input",
);
cy.findByTestId("hex-btn").should("have.text", "Hex (Default)");
cy.findByTestId("transaction-hex").should("have.text", "0x");
Expand Down Expand Up @@ -172,7 +172,7 @@ context("/tx/[tid] on iphone-x", () => {

it("should display transaction timestamp", () => {
cy.findByTestId("transaction-timestamp").contains(
"(06-16-2023 04:57:05 AM +UTC)"
"(06-16-2023 04:57:05 AM +UTC)",
);
});

Expand All @@ -188,14 +188,14 @@ context("/tx/[tid] on iphone-x", () => {
cy.findByTestId("transaction-block").click();
cy.location("href").should(
"eq",
`${Cypress.config().baseUrl}/block/${block}`
`${Cypress.config().baseUrl}/block/${block}`,
);
});

it("should have number of block confirmations", () => {
cy.findByTestId("transaction-confimations-title").should(
"have.text",
"Confirmation"
"Confirmation",
);
cy.findByTestId("transaction-confirmations")
.should("be.visible")
Expand All @@ -210,7 +210,7 @@ context("/tx/[tid] on iphone-x", () => {
it("should display transaction type and status", () => {
cy.findByTestId("transaction-type-title").should(
"have.text",
"Transaction type"
"Transaction type",
);
cy.findByTestId("transaction-type").should("have.text", "Contract call");
cy.findByTestId("transaction-status-title").should("have.text", "Status");
Expand All @@ -222,7 +222,7 @@ context("/tx/[tid] on iphone-x", () => {
cy.findByTestId("transaction-amount").contains("0.30000000 DFI");
cy.findByTestId("transaction-fee-title").should(
"have.text",
"Transaction fee"
"Transaction fee",
);
cy.findByTestId("transaction-fee").should("have.text", "0.00028350 DFI");
});
Expand Down Expand Up @@ -252,15 +252,15 @@ context("/tx/[tid] on iphone-x", () => {
cy.findByTestId("gas-limit").should("have.text", "21,000");
cy.findByTestId("gas-used-by-txn-title").should(
"have.text",
"Gas used by txn"
"Gas used by txn",
);
cy.findByTestId("gas-used").should("have.text", "21,000");
cy.findByTestId("gas-used-percentage").should("have.text", "100.00%");
cy.findByTestId("nonce-title").should("have.text", "Nonce");
cy.findByTestId("nonce").should("have.text", "2");
cy.findByTestId("position-in-block-title").should(
"have.text",
"Position in block"
"Position in block",
);
cy.findByTestId("position").should("have.text", "1");
cy.findByTestId("mobile-tooltip-gas-price").should("be.visible");
Expand All @@ -273,7 +273,7 @@ context("/tx/[tid] on iphone-x", () => {
it("should display raw input", () => {
cy.findByTestId("transaction-raw-input-title").should(
"have.text",
"Raw input"
"Raw input",
);
cy.findByTestId("hex-btn").should("have.text", "Hex (Default)");
cy.findByTestId("transaction-hex").should("have.text", "0x");
Expand Down
2 changes: 1 addition & 1 deletion apps/web/cypress/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// @ts-ignore
module.exports = (
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions
config: Cypress.PluginConfigOptions,
): any => {
// @ts-ignore
require("@cypress/code-coverage/task")(on, config);
Expand Down
8 changes: 4 additions & 4 deletions apps/web/src/api/BlocksApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default {
getBlocks: async (
network: NetworkConnection,
blockNumber?: string,
itemsCount?: string
itemsCount?: string,
): Promise<BlockWithPaginationProps> => {
const baseUrl = getBaseUrl(network);
const params = filterParams([
Expand All @@ -25,7 +25,7 @@ export default {
},
getBlock: async (
network: NetworkConnection,
blockId: string
blockId: string,
): Promise<BlockProps> => {
const baseUrl = getBaseUrl(network);
const res = await fetch(`${baseUrl}/${MAIN_BLOCKS_URL}/${blockId}`);
Expand All @@ -40,7 +40,7 @@ export default {
blockId: string,
blockNumber?: string,
itemsCount?: string,
index?: string
index?: string,
): Promise<RawTxnWithPaginationProps> => {
const baseUrl = getBaseUrl(network);
const params = filterParams([
Expand All @@ -49,7 +49,7 @@ export default {
{ key: "index", value: index },
]);
const res = await fetch(
`${baseUrl}/${MAIN_BLOCKS_URL}/${blockId}/transactions${params}`
`${baseUrl}/${MAIN_BLOCKS_URL}/${blockId}/transactions${params}`,
);
return wrapResponse<RawTxnWithPaginationProps>(res);
},
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/api/LatestDataApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default {
});
},
getLatestTransactions: async (
network: NetworkConnection
network: NetworkConnection,
): Promise<RowData[]> => {
const baseUrl = getBaseUrl(network);
const resTxn = await fetch(`${baseUrl}/${MAIN_LATEST_TRANSACTION_URL}`);
Expand Down
12 changes: 6 additions & 6 deletions apps/web/src/api/SmartContractApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default {
getSmartContracts: async (
network: NetworkConnection,
smartContractId?: string,
itemsCount?: string
itemsCount?: string,
): Promise<SmartContractWithPaginationProps> => {
const baseUrl = getBaseUrl(network);
const params = filterParams([
Expand All @@ -29,7 +29,7 @@ export default {
verifySmartContract: async (
network: NetworkConnection,
data,
type: CompilerType
type: CompilerType,
): Promise<any> => {
const baseUrl = getBaseUrl(network);
const action =
Expand All @@ -45,21 +45,21 @@ export default {
},
verifySmartContractUsingJSONInput: async (
network: NetworkConnection,
data
data,
): Promise<any> => {
const baseUrl = getBaseUrl(network);
const res = await fetch(
`${baseUrl}/api?module=contract&action=verifysourcecode`,
{
method: "POST",
body: data,
}
},
);
return wrapResponse(res);
},
verifySmartContractUsingMultiPartFile: async (
network: NetworkConnection,
data
data,
): Promise<any> => {
const baseUrl = getBaseUrl(network);
const res = await fetch(`${baseUrl}/${VERIFY_SMART_CONTRACT_URL}`, {
Expand All @@ -74,7 +74,7 @@ export default {
`${baseUrl}/api?module=contract&action=checkverifystatus&guid=${guid}`,
{
method: "GET",
}
},
);
return wrapResponse(res);
},
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/api/TokenApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { TOKENS_URL, getBaseUrl, wrapResponse } from ".";
export default {
getToken: async (
network: NetworkConnection,
tokenId: string
tokenId: string,
): Promise<TokenProps> => {
const baseUrl = getBaseUrl(network);
const res = await fetch(`${baseUrl}/${TOKENS_URL}/${tokenId}`);
return wrapResponse<TokenProps>(res);
},
getTokenCounters: async (
network: NetworkConnection,
tokenId: string
tokenId: string,
): Promise<TokenCountersProps> => {
const baseUrl = getBaseUrl(network);
const res = await fetch(`${baseUrl}/${TOKENS_URL}/${tokenId}/counters`);
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/api/TokensApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default {
isNameNull?: string,
itemsCount?: string,
marketCap?: string,
name?: string
name?: string,
): Promise<RawTokenWithPaginationProps> => {
const baseUrl = getBaseUrl(network);
const params = filterParams([
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/api/TransactionsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
network: NetworkConnection,
blockNumber?: string,
itemsCount?: string,
index?: string
index?: string,
): Promise<RawTxnWithPaginationProps> => {
const baseUrl = getBaseUrl(network);
const params = filterParams([
Expand All @@ -32,7 +32,7 @@ export default {
},
getTransaction: async (
network: NetworkConnection,
txnHash: string
txnHash: string,
): Promise<RawTransactionI> => {
const baseUrl = getBaseUrl(network);
const res = await fetch(`${baseUrl}/${TRANSACTIONS_URL}/${txnHash}`);
Expand Down
12 changes: 6 additions & 6 deletions apps/web/src/api/WalletAddressApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,37 @@ import { NetworkConnection } from "@contexts/Environment";
export default {
getDetail: async (
network: NetworkConnection,
aid: string
aid: string,
): Promise<WalletAddressInfoI> => {
const baseUrl = getBaseUrl(network);
const res = await fetch(`${baseUrl}/${WALLET_ADDRESS_URL}/${aid}`);
return wrapResponse<WalletAddressInfoI>(res);
},
getCounters: async (
network: NetworkConnection,
aid: string
aid: string,
): Promise<WalletAddressCounterI> => {
const baseUrl = getBaseUrl(network);
const res = await fetch(`${baseUrl}/${WALLET_ADDRESS_URL}/${aid}/counters`);
return wrapResponse<WalletAddressCounterI>(res);
},
getAllTokens: async (
network: NetworkConnection,
aid: string
aid: string,
): Promise<TokenItemI[]> => {
const baseUrl = getBaseUrl(network);
const res = await fetch(
`${baseUrl}/${WALLET_ADDRESS_URL}/${aid}/token-balances`
`${baseUrl}/${WALLET_ADDRESS_URL}/${aid}/token-balances`,
);
return wrapResponse<TokenItemI[]>(res);
},
getAllAddressTokens: async (
network: NetworkConnection,
aid: string
aid: string,
): Promise<WalletAddressTokenBalanceI[]> => {
const baseUrl = getBaseUrl(network);
const res = await fetch(
`${baseUrl}/${WALLET_ADDRESS_URL}/${aid}/token-balances`
`${baseUrl}/${WALLET_ADDRESS_URL}/${aid}/token-balances`,
);
return wrapResponse<WalletAddressTokenBalanceI[]>(res);
},
Expand Down
Loading

0 comments on commit 4081d0a

Please sign in to comment.