From 7ef448987fbe25295e803fb7a6d73932ca2c289a Mon Sep 17 00:00:00 2001 From: PJ Date: Sun, 31 May 2026 18:56:46 +0530 Subject: [PATCH] fix(folio): parse raw amount input as cents in submit predicate txnAmountField holds raw user keystrokes, not formatted balance text. Route it through parseTypedAmount so "50" reads as $50, matching how the app commits the transaction. --- examples/folio/sanderling/spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/folio/sanderling/spec.ts b/examples/folio/sanderling/spec.ts index 300bef4..ddd8b16 100644 --- a/examples/folio/sanderling/spec.ts +++ b/examples/folio/sanderling/spec.ts @@ -10,7 +10,7 @@ import { whenRoute, } from "@sanderling/spec"; import { defaultActions } from "@sanderling/spec/defaults"; -import { submitChangesBalanceByTypedAmount } from "./predicates"; +import { parseTypedAmount, submitChangesBalanceByTypedAmount } from "./predicates"; interface Account { name: string; @@ -99,7 +99,7 @@ const submitMovesBalanceByTypedAmount = always( next(() => submitChangesBalanceByTypedAmount({ lastAction: lastAction.current, - typedAmount: parseDollarCents(txnAmountField.previous?.text), + typedAmount: parseTypedAmount(txnAmountField.previous?.text), prevTotalBalance: totalBalance.previous ?? 0, currTotalBalance: totalBalance.current, }),