Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import { Configuration } from "@hyperledger/cactus-core-api";
import { SessionDataRollbackActionsPerformedEnum } from "../generated/openapi/typescript-axios";
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import { Configuration } from "@hyperledger/cactus-core-api";
import {
DefaultApi as FabricApi,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import type { Server } from "http";
import type { Server as SecureServer } from "https";
import { Optional } from "typescript-optional";
Expand Down Expand Up @@ -397,8 +396,7 @@ export abstract class PluginSatpGateway
return this.objectSigner.sign(msg);
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
verifySignature(obj: any, pubKey: string): boolean {
verifySignature(obj: IRemoteLog, pubKey: string): boolean {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is making the CI fail.

The signature verification shouldn't be from the IRemoteLog, this is used to verify the requests/responses of the SATP messages protocol.

const sourceSignature = new Uint8Array(Buffer.from(obj.signature, "hex"));
const sourcePubkey = new Uint8Array(Buffer.from(pubKey, "hex"));

Expand Down Expand Up @@ -1143,8 +1141,7 @@ export abstract class PluginSatpGateway
sessionID: string,
request: Promise<AxiosResponse>,
message: string,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
): Promise<any> {
): Promise<AxiosResponse | void> {
const fnTag = `${this.className}#makeRequest()`;

const sessionData = this.sessions.get(sessionID);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { ILocalLog } from "../plugin-satp-gateway";
import { ILocalLogRepository } from "./interfaces/repository";
import knex, { Knex } from "knex";
import * as knexfileConfig from "../../../knex/knexfile";

export class KnexLocalLogRepository implements ILocalLogRepository {
readonly database: Knex;

public constructor(config: Knex.Config | undefined) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const configFile = require("../../../knex/knexfile.ts")[
const configFile = (knexfileConfig as Record<string, Knex.Config>)[
process.env.ENVIRONMENT || "development"
];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { IRemoteLogRepository } from "./interfaces/repository";
import { IRemoteLog } from "../plugin-satp-gateway";
import knex, { Knex } from "knex";
import * as knexfileRemoteConfig from "../../../knex/knexfile-remote";

export class KnexRemoteLogRepository implements IRemoteLogRepository {
readonly database: Knex;
Expand All @@ -9,8 +10,7 @@ export class KnexRemoteLogRepository implements IRemoteLogRepository {
// so that both gateways can have access to the same database
// simulating a remote log storage
public constructor(config: Knex.Config | undefined) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const configFile = require("../../../knex/knexfile-remote.ts")[
const configFile = (knexfileRemoteConfig as Record<string, Knex.Config>)[
process.env.ENVIRONMENT || "development"
];

Expand Down
Loading