Skip to content

Commit

Permalink
fix(backend): directly access systemSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
eventualbuddha committed Oct 24, 2024
1 parent 4bcdeab commit bfc6348
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/backend/src/cast_vote_records/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export interface ScannerStoreBase {
getCastVoteRecordRootHash(): string;
getElectionRecord(): ElectionRecord | undefined;
getSystemSettings(): SystemSettings | undefined;
getMarkThresholds(): MarkThresholds;
getTestMode(): boolean;
updateCastVoteRecordHashes(
castVoteRecordId: string,
Expand Down Expand Up @@ -696,6 +695,7 @@ export async function exportCastVoteRecordsToUsbDrive(
if (usbMountPoint === undefined) {
return err({ type: 'missing-usb-drive' });
}
const systemSettings = assertDefined(scannerStore.getSystemSettings());
const exportContext: ExportContext = {
exporter: new Exporter({
allowedExportPatterns: SCAN_ALLOWED_EXPORT_PATTERNS,
Expand All @@ -706,9 +706,9 @@ export async function exportCastVoteRecordsToUsbDrive(
batches: scannerStore.getBatches(),
electionDefinition: assertDefined(scannerStore.getElectionRecord())
.electionDefinition,
systemSettings: assertDefined(scannerStore.getSystemSettings()),
systemSettings,
inTestMode: scannerStore.getTestMode(),
markThresholds: scannerStore.getMarkThresholds(),
markThresholds: systemSettings.markThresholds,
pollsState:
scannerStore.scannerType === 'precinct'
? scannerStore.getPollsState()
Expand Down

0 comments on commit bfc6348

Please sign in to comment.