From bfc6348016a3e86c1e9b148625f02cdd78da0f47 Mon Sep 17 00:00:00 2001 From: Brian Donovan <1938+eventualbuddha@users.noreply.github.com> Date: Thu, 24 Oct 2024 13:27:59 -0700 Subject: [PATCH] fix(backend): directly access systemSettings --- libs/backend/src/cast_vote_records/export.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/backend/src/cast_vote_records/export.ts b/libs/backend/src/cast_vote_records/export.ts index ff85c13236..e06f9bb824 100644 --- a/libs/backend/src/cast_vote_records/export.ts +++ b/libs/backend/src/cast_vote_records/export.ts @@ -81,7 +81,6 @@ export interface ScannerStoreBase { getCastVoteRecordRootHash(): string; getElectionRecord(): ElectionRecord | undefined; getSystemSettings(): SystemSettings | undefined; - getMarkThresholds(): MarkThresholds; getTestMode(): boolean; updateCastVoteRecordHashes( castVoteRecordId: string, @@ -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, @@ -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()