From e35764950b59bde6e36bdfad1ca671eef564a6d1 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 8 Oct 2026 16:34:06 -0700 Subject: Max fills the amount in the unit the field shows: in fiat that's money floored to the cent (so it never parses back above the maximum), not a BTC figure under a CAD label. One ctx.amountField helper for the ark send/LN Max, the gift Max and fixed-amount zap/BOLT 12 fills Co-Authored-By: Claude Opus 5.5 --- src/features/ark.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/features/ark.js') diff --git a/src/features/ark.js b/src/features/ark.js index 90b2a01..d5b6e7f 100644 --- a/src/features/ark.js +++ b/src/features/ark.js @@ -1223,7 +1223,7 @@ export function arkFeature(ctx) { } return Math.max(0, amt); } - const amountFill = (sat) => (ctx.getUnit() === 'sats' ? String(sat) : (sat / 1e8).toFixed(8)); + const amountFill = (sat) => ctx.amountField(sat); // Auto-pay progress + success as ONE structurally identical card, so the // paying → paid step is a class flip (spinner ring settles into the green @@ -3651,7 +3651,7 @@ export function arkFeature(ctx) { ? (arkBalance()?.spendableSat || 0) : maxBoardSat(); if (!sat) return null; - return ctx.getUnit() === 'sats' ? String(sat) : (sat / 1e8).toFixed(8); + return ctx.amountField(sat); }, sendFormNote(a) { if (!isArkAddress(a)) return null; -- cgit v1.2.3