Skip to content

Commit

Permalink
Remove unused routes (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
grod220 authored Jun 26, 2024
1 parent c04a858 commit 7810d94
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 197 deletions.
2 changes: 0 additions & 2 deletions apps/extension/src/routes/popup/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ export enum PopupPath {
SETTINGS_AUTO_LOCK = '/settings/auto-lock',
SETTINGS_CLEAR_CACHE = '/settings/clear-cache',
SETTINGS_RECOVERY_PASSPHRASE = '/settings/recovery-passphrase',
SETTINGS_FULL_VIEWING_KEY = '/settings/full-viewing-key',
SETTINGS_SPEND_KEY = '/settings/spend-key',
SETTINGS_NUMERAIRES = '/settings/numeraires',
}
10 changes: 0 additions & 10 deletions apps/extension/src/routes/popup/settings/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ import { SettingsAdvanced } from './settings-advanced';
import { SettingsAutoLock } from './settings-auto-lock';
import { SettingsClearCache } from './settings-clear-cache';
import { SettingsConnectedSites } from './settings-connected-sites';
import { SettingsFullViewingKey } from './settings-full-viewing-key';
import { SettingsPassphrase } from './settings-passphrase';
import { SettingsRPC } from './settings-rpc';
import { SettingsSecurity } from './settings-security';
import { SettingsSpendKey } from './settings-spend-key';
import { SettingsDefaultFrontend } from './settings-default-frontend';
import { SettingsNumeraires } from './settings-numeraires';

Expand Down Expand Up @@ -49,14 +47,6 @@ export const settingsRoutes = [
path: PopupPath.SETTINGS_RECOVERY_PASSPHRASE,
element: <SettingsPassphrase />,
},
{
path: PopupPath.SETTINGS_FULL_VIEWING_KEY,
element: <SettingsFullViewingKey />,
},
{
path: PopupPath.SETTINGS_SPEND_KEY,
element: <SettingsSpendKey />,
},
{
path: PopupPath.SETTINGS_NUMERAIRES,
element: <SettingsNumeraires />,
Expand Down

This file was deleted.

84 changes: 0 additions & 84 deletions apps/extension/src/routes/popup/settings/settings-spend-key.tsx

This file was deleted.

17 changes: 0 additions & 17 deletions apps/extension/src/state/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@ import { generateSpendKey, getFullViewingKey, getWalletId } from '@penumbra-zone
import { Key } from '@penumbra-zone/crypto-web/encryption';
import { ExtensionStorage } from '../storage/base';
import { LocalStorageState } from '../storage/types';
import {
FullViewingKey,
SpendKey,
} from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb';
import { Wallet, WalletCreate } from '@penumbra-zone/types/wallet';

export interface WalletsSlice {
all: Wallet[];
addWallet: (toAdd: WalletCreate) => Promise<Wallet>;
getSeedPhrase: () => Promise<string[]>;
getSpendKey: () => Promise<SpendKey>;
getFullViewingKey: () => Promise<FullViewingKey>;
}

export const createWalletsSlice =
Expand Down Expand Up @@ -61,17 +55,6 @@ export const createWalletsSlice =

return decryptedSeedPhrase.split(' ');
},
getSpendKey: async () => {
const seedPhrase = (await get().wallets.getSeedPhrase()).join(' ');

return generateSpendKey(seedPhrase);
},
getFullViewingKey: async () => {
const seedPhrase = (await get().wallets.getSeedPhrase()).join(' ');
const spendKey = generateSpendKey(seedPhrase);

return getFullViewingKey(spendKey);
},
};
};

Expand Down

0 comments on commit 7810d94

Please sign in to comment.