refactor(folio): seed txn amounts via integers().between(1,500)

This commit is contained in:
pj committed 2026-06-01 21:12:03 +05:30
1 parent b824af967e
commit 04aabbe4c7
1 file changed
+3 -2
+3 -2
View File
@@ -5,6 +5,7 @@ import {
always,
extract,
from,
integers,
next,
weighted,
whenRoute,
@@ -146,7 +147,7 @@ const addAccount = whenRoute(route, ["home", "add-account"], () => {
return opts;
});
const amounts = from(["10", "50", "25", "100", "5"]);
const amounts = integers().between(1, 500);
const addTxn = whenRoute(route, ["home", "ledger", "add-transaction"], () => {
if (route.current === "home") {
@@ -161,7 +162,7 @@ const addTxn = whenRoute(route, ["home", "ledger", "add-transaction"], () => {
const field = txnAmountField.current;
const submit = txnSubmit.current;
const opts = [];
if (field) opts.push(InputText({ into: field, text: amounts.generate() }));
if (field) opts.push(InputText({ into: field, text: String(amounts.generate()) }));
if (submit) opts.push(Tap({ on: submit }));
return opts;
});