Skip to content

Commit

Permalink
refactor: remove unused static vars in services
Browse files Browse the repository at this point in the history
  • Loading branch information
iFergal committed Apr 29, 2024
1 parent 80a80b6 commit 1a70312
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
6 changes: 1 addition & 5 deletions src/core/agent/services/connectionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,14 @@ import { PreferencesKeys, PreferencesStorage } from "../../storage";
import { waitAndGetDoneOp } from "./utils";

class ConnectionService extends AgentService {
static readonly COULD_NOT_CREATE_OOB_VIA_MEDIATOR =
"Could not create new mediator oob invitation";
static readonly INVALID_CONNECTIONLESS_MSG =
"Invalid connectionless OOBI - does not contain d_m parameter";
static readonly CONNECTION_NOTE_RECORD_NOT_FOUND =
"Connection note record not found";
static readonly CONNECTION_METADATA_RECORD_NOT_FOUND =
"Connection metadata record not found";
static readonly DEFAULT_ROLE = "agent";

static readonly FAILED_TO_RESOLVE_OOBI =
"Failed to resolve OOBI, operation not completing...";

static resolvedOobi: { [key: string]: any } = {};

onConnectionStateChanged(
Expand Down
12 changes: 0 additions & 12 deletions src/core/agent/services/identifierService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,12 @@ import { waitAndGetDoneOp } from "./utils";
const identifierTypeThemes = [0, 1];

class IdentifierService extends AgentService {
static readonly DID_MISSING_INCORRECT =
"DID returned from agent was of unexpected DID method";
static readonly DID_MISSING_DISPLAY_NAME =
"DID display name missing for stored DID";
static readonly DID_MISSING_DID_DOC =
"DID document missing or unresolvable for stored DID";
static readonly UNEXPECTED_DID_DOC_FORMAT =
"DID document format is missing expected values for stored DID";
static readonly IDENTIFIER_METADATA_RECORD_MISSING =
"Identifier metadata record does not exist";
static readonly UNEXPECTED_MISSING_DID_RESULT_ON_CREATE =
"DID was successfully created but the DID was not returned in the state returned";
static readonly IDENTIFIER_NOT_ARCHIVED = "Identifier was not archived";
static readonly THEME_WAS_NOT_VALID = "Identifier theme was not valid";
static readonly EXN_MESSAGE_NOT_FOUND =
"There's no exchange message for the given SAID";
static readonly ONLY_ALLOW_KERI_CONTACTS =
"Can only create multi-sig using KERI contacts with specified OOBI URLs";
static readonly FAILED_TO_ROTATE_AID =
"Failed to rotate AID, operation not completing...";

Expand Down
5 changes: 0 additions & 5 deletions src/core/agent/services/multiSigService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,14 @@ import {
} from "../records";
import { AgentService } from "./agentService";
import { MultiSigIcpRequestDetails } from "./identifier.types";
import { waitAndGetDoneOp } from "./utils";
import { RecordType } from "../../storage/storage.types";

class MultiSigService extends AgentService {
static readonly FAILED_TO_RESOLVE_OOBI =
"Failed to resolve OOBI, operation not completing...";
static readonly INVALID_THRESHOLD = "Invalid threshold";
static readonly CANNOT_GET_KEYSTATES_FOR_MULTISIG_MEMBER =
"Unable to retrieve key states for given multi-sig member";
static readonly EXN_MESSAGE_NOT_FOUND =
"There's no exchange message for the given SAID";
static readonly ONLY_ALLOW_KERI_CONTACTS =
"Can only create multi-sig using KERI contacts with specified OOBI URLs";
static readonly MULTI_SIG_NOT_FOUND =
"There's no multi sig identifier for the given SAID";
static readonly AID_IS_NOT_MULTI_SIG =
Expand Down

0 comments on commit 1a70312

Please sign in to comment.