diff --git a/apps/machine/electron/main.ts b/apps/machine/electron/main.ts
index 961efc6..6cc7e6f 100644
--- a/apps/machine/electron/main.ts
+++ b/apps/machine/electron/main.ts
@@ -97,6 +97,8 @@ ipcMain.handle('get-config', () => {
atmPrivateKey: process.env.VITE_ATM_PRIVATE_KEY || '',
adminToken: process.env.VITE_ADMIN_TOKEN || '',
appId: process.env.VITE_APP_ID || '',
+ appToken: process.env.VITE_APP_TOKEN || '',
+ linkingToken: process.env.VITE_LINKING_TOKEN || '',
// Hardware configuration
machineModel: process.env.VITE_LAMASSU_MACHINE_MODEL || 'sintra',
diff --git a/apps/machine/electron/preload.ts b/apps/machine/electron/preload.ts
index 506c0a1..f9622f0 100644
--- a/apps/machine/electron/preload.ts
+++ b/apps/machine/electron/preload.ts
@@ -19,6 +19,7 @@ export interface RuntimeConfig {
atmPrivateKey: string
adminToken: string
appId: string
+ appToken: string
machineModel: string
fiatCode: string
validatorDevice?: string
diff --git a/apps/machine/src/services/hal.ts b/apps/machine/src/services/hal.ts
index 489e115..77059e5 100644
--- a/apps/machine/src/services/hal.ts
+++ b/apps/machine/src/services/hal.ts
@@ -35,6 +35,8 @@ export interface HalConfig {
}
export interface ValidatorCallbacks {
+ /** Called when a bill is read but not yet accepted. Return true to accept, false to reject. */
+ shouldAcceptBill: (denomination: number) => boolean
onBillInserted: (denomination: number) => void
onBillRejected: (reason: string) => void
onError: (error: string) => void
@@ -157,9 +159,15 @@ export async function initializeHalServices(config: HalConfig): Promise
- {{ currentQrValue.split('\n')[0].slice(0, 32) }}...
+ {{ currentQrValue.split('\n')[0]?.slice(0, 32) }}...