diff --git a/src/__tests__/integration/wallet-ingest.test.ts b/src/__tests__/integration/wallet-ingest.test.ts index 42e5dac..d2c984e 100644 --- a/src/__tests__/integration/wallet-ingest.test.ts +++ b/src/__tests__/integration/wallet-ingest.test.ts @@ -223,6 +223,11 @@ describe("location", () => { await ingest(req({ ...breadworldBank, event_id: 75, amount: 42.44, merchant: "SP PEAKDESIGN", + // The model's own answer for this row, included because every real + // interpretation carries one -- omitting it is what let a wrong + // precedence order pass this test the first time, and ship + // "SAN FRANCISOUS" into the ledger. + location: "SAN FRANCISOUS", notif_body: "$42.44 paid from Mastercard ending...8032. SP PEAKDESIGN SAN FRANCISOUS", })); const [t] = await txns(); diff --git a/src/lib/wallet-ingestion.ts b/src/lib/wallet-ingestion.ts index 5d29f6e..aefeb36 100644 --- a/src/lib/wallet-ingestion.ts +++ b/src/lib/wallet-ingestion.ts @@ -139,9 +139,15 @@ export async function processWalletIngestion(ev: WalletEvent): Promise