From 90afc140b10ec0e555bafd3d4ff510b798b862d0 Mon Sep 17 00:00:00 2001 From: Martin Laursen <100691050+av-martin@users.noreply.github.com> Date: Fri, 10 May 2024 13:02:07 +0200 Subject: [PATCH] Remove some unused code (#295) * remove hard coded key * remove unused config key --- lib/av_client/election_config.ts | 17 ++++------------- lib/av_client/types.ts | 6 ------ 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/lib/av_client/election_config.ts b/lib/av_client/election_config.ts index 342da00a..d797338f 100644 --- a/lib/av_client/election_config.ts +++ b/lib/av_client/election_config.ts @@ -1,21 +1,12 @@ -import { BulletinBoard } from "./connectors/bulletin_board"; -import { LatestConfig } from "./types"; -import { InvalidConfigError } from "./errors"; +import {BulletinBoard} from "./connectors/bulletin_board"; +import {LatestConfig} from "./types"; +import {InvalidConfigError} from "./errors"; export async function fetchLatestConfig(bulletinBoard: BulletinBoard): Promise { return bulletinBoard.getLatestConfig() .then( (response: { data: LatestConfig }) => { - const configData = response.data; - - // const privKey = 'b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9' - const pubKey = '03e9858b6e48eb93d8f27aa76b60806298c4c7dd94077ad6c3ff97c44937888647' - configData.affidavit = { - curve: 'k256', - encryptionKey: pubKey - } - - return configData; + return response.data; }) .catch((error) => { console.error() diff --git a/lib/av_client/types.ts b/lib/av_client/types.ts index 26174a9d..ec6afe3f 100644 --- a/lib/av_client/types.ts +++ b/lib/av_client/types.ts @@ -227,11 +227,6 @@ export type BallotStatus = { } } -export interface AffidavitConfig { - curve: string; - encryptionKey: string; -} - export type BallotSelection = { reference: string contestSelections: ContestSelection[] @@ -279,7 +274,6 @@ export type ReadableOptionSelection = { export interface LatestConfig { items: LatestConfigItems receipt?: string - affidavit?: AffidavitConfig } export interface LatestConfigItems {