aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/ark.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-08 16:34:06 -0700
committerAdam Soltys <[email protected]>2026-10-08 16:34:06 -0700
commite35764950b59bde6e36bdfad1ca671eef564a6d1 (patch)
treea72a950e6e8ffd21312b6e2610ee7c73092026bc /src/features/ark.js
parentd3a0af140dabdd6b53c1be0532b37f28254633be (diff)
downloadcoinosv3-e35764950b59bde6e36bdfad1ca671eef564a6d1.tar.gz
coinosv3-e35764950b59bde6e36bdfad1ca671eef564a6d1.zip
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 <[email protected]>
Diffstat (limited to 'src/features/ark.js')
-rw-r--r--src/features/ark.js4
1 files changed, 2 insertions, 2 deletions
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;