Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some unused code #295

Merged
merged 2 commits into from
May 10, 2024
Merged
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
17 changes: 4 additions & 13 deletions lib/av_client/election_config.ts
Original file line number Diff line number Diff line change
@@ -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<LatestConfig> {
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()
Expand Down
6 changes: 0 additions & 6 deletions lib/av_client/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,6 @@ export type BallotStatus = {
}
}

export interface AffidavitConfig {
curve: string;
encryptionKey: string;
}

export type BallotSelection = {
reference: string
contestSelections: ContestSelection[]
Expand Down Expand Up @@ -279,7 +274,6 @@ export type ReadableOptionSelection = {
export interface LatestConfig {
items: LatestConfigItems
receipt?: string
affidavit?: AffidavitConfig
}

export interface LatestConfigItems {
Expand Down
Loading