Skip to content

Commit

Permalink
refactor: remove some unused things
Browse files Browse the repository at this point in the history
  • Loading branch information
iFergal committed Apr 29, 2024
1 parent efc6e0f commit 80a80b6
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 31 deletions.
14 changes: 0 additions & 14 deletions src/core/agent/agent.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import { IdentifierStorage } from "./records/identifierStorage";
import { CredentialStorage } from "./records/credentialStorage";
import { BasicStorage } from "./records/basicStorage";

enum Blockchain {
CARDANO = "Cardano",
}

enum ConnectionStatus {
CONFIRMED = "confirmed",
PENDING = "pending",
Expand All @@ -32,14 +28,6 @@ enum MiscRecordId {
OP_PASS_HINT = "app-op-password-hint",
}

interface CryptoAccountRecordShortDetails {
id: string;
displayName: string;
blockchain: Blockchain;
totalADAinUSD: number;
usesIdentitySeedPhrase: boolean;
}

interface ConnectionShortDetails {
id: string;
label: string;
Expand Down Expand Up @@ -235,7 +223,6 @@ enum NotificationRoute {
}

export {
Blockchain,
ConnectionStatus,
ConnectionHistoryType,
MiscRecordId,
Expand All @@ -246,7 +233,6 @@ export {
};

export type {
CryptoAccountRecordShortDetails,
ConnectionShortDetails,
ConnectionDetails,
ConnectionNoteDetails,
Expand Down
1 change: 1 addition & 0 deletions src/core/agent/records/credentialMetadataRecord.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ enum CredentialMetadataRecordStatus {
CONFIRMED = "confirmed",
PENDING = "pending",
}

interface CredentialMetadataRecordProps {
id: string;
createdAt?: Date;
Expand Down
1 change: 0 additions & 1 deletion src/core/agent/records/credentialStorage.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { RecordType } from "../../storage/storage.types";
import { CredentialMetadataRecord } from "./credentialMetadataRecord";
import {
CredentialMetadataRecordProps,
Expand Down
8 changes: 3 additions & 5 deletions src/core/agent/records/identifierStorage.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { RecordType } from "../../storage/storage.types";
import { BasicRecord } from "./basicRecord";
import { IdentifierMetadataRecord } from "./identifierMetadataRecord";
import { IdentifierStorage } from "./identifierStorage";

Expand All @@ -15,15 +13,14 @@ const storageService = jest.mocked({

const identifierStorage = new IdentifierStorage(storageService as any);

const now = new Date();

const identifierMetadataRecordProps = {
id: "aidHere",
displayName: "Identifier 2",
signifyName: "uuid-here",
createdAt: now,
createdAt: new Date(),
theme: 0,
};

const identifierMetadataRecord = new IdentifierMetadataRecord({
...identifierMetadataRecordProps,
});
Expand All @@ -32,6 +29,7 @@ const identifierMetadataRecord2 = new IdentifierMetadataRecord({
...identifierMetadataRecordProps,
id: "id2",
});

describe("Connection service of agent", () => {
beforeEach(() => {
jest.resetAllMocks();
Expand Down
2 changes: 0 additions & 2 deletions src/core/storage/preferences/preferencesStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ enum PreferencesKeys {
APP_ALREADY_INIT = "app-already-init",
APP_STATE_FLAGS = "app-state-flags",
APP_LANGUAGE = "app-language",
APP_DEFAULT_CRYPTO_ACCOUNT = "app-default-crypto-account",
APP_HIDE_CRYPTO_BALANCES = "app-hide-crypto-balances",
APP_IDENTIFIERS_FAVOURITES = "app-identifiers-favourites",
APP_CREDS_FAVOURITES = "app-creds-favourites",
APP_USER_NAME = "app-user-name",
Expand Down
9 changes: 0 additions & 9 deletions src/ui/pages/PasscodeLogin/PasscodeLogin.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ interface StoreMocked {
seedPhrase256: string;
selected: number;
};
cryptoAccountsCache: {
cryptoAccounts: never[];
};
}

const mockStore = configureStore();
Expand Down Expand Up @@ -66,9 +63,6 @@ describe("Passcode Login Page", () => {
seedPhrase256: "",
selected: FIFTEEN_WORDS_BIT_LENGTH,
},
cryptoAccountsCache: {
cryptoAccounts: [],
},
};

const initialStateWithoutSeedPhrase = {
Expand All @@ -87,9 +81,6 @@ describe("Passcode Login Page", () => {
seedPhrase256: "",
selected: FIFTEEN_WORDS_BIT_LENGTH,
},
cryptoAccountsCache: {
cryptoAccounts: [],
},
};

test("Renders Passcode Login page with title and description", () => {
Expand Down

0 comments on commit 80a80b6

Please sign in to comment.