diff --git a/frontend/src/api.ts b/frontend/src/api.ts index d5c2269b..0f0bb634 100644 --- a/frontend/src/api.ts +++ b/frontend/src/api.ts @@ -1859,6 +1859,10 @@ export interface InstrumentSummary { instrument_id: string; admin: string; total_supply: string; + /** Initial supply recorded at create. Creating mints nothing, so this + * is stated intent, not an on-ledger fact — shown only while it + * differs from total_supply. Absent for unregistered instruments. */ + declared_supply?: string; holder_count: number; contract_count: number; holders: HolderRow[]; diff --git a/frontend/src/screens/TokensScreen.tsx b/frontend/src/screens/TokensScreen.tsx index b72fb729..706d4485 100644 --- a/frontend/src/screens/TokensScreen.tsx +++ b/frontend/src/screens/TokensScreen.tsx @@ -144,7 +144,7 @@ export function TokensScreen() { const [showCreate, setShowCreate] = useState(false); const [modal, setModal] = useState< - | { kind: "mint"; symbol: string } + | { kind: "mint"; symbol: string; amount?: string } | { kind: "transfer"; symbol: string } | { kind: "burn"; symbol: string } | { kind: "faucet"; symbol: string } @@ -607,6 +607,23 @@ export function TokensScreen() { {detailTab === "overview" && ( <> {summary && } + {summary && remainingToMint(summary) && ( +
+ + + creating an instrument records its supply; minting is what issues it + +
+ )} {summary && summary.holders.length > 0 && }

@@ -733,6 +750,7 @@ export function TokensScreen() { instance={instance} role={role} parties={parties} + initial={modal.amount ? { amount: modal.amount } : undefined} onPartiesChanged={() => bump()} onClose={() => setModal(null)} submit={(v) => mintToken(instance, modal.symbol, v.to, v.amount, role)} @@ -855,7 +873,6 @@ function TransferModal({ const [amount, setAmount] = useState(""); const [reason, setReason] = useState(""); const [autoAccept, setAutoAccept] = useState(true); - const [atomic, setAtomic] = useState(false); const [busy, setBusy] = useState(false); const [plan, setPlan] = useState(null); @@ -877,7 +894,7 @@ function TransferModal({ e.preventDefault(); setBusy(true); try { - const res = await transferToken(instance, symbol, from, to, amount, reason || undefined, role, autoAccept, atomic && autoAccept); + const res = await transferToken(instance, symbol, from, to, amount, reason || undefined, role, autoAccept, false); // A non-auto-accept Offer returns an instruction id; anything settled just closes. onDone(!res.settled && res.transferInstructionId ? { instructionId: res.transferInstructionId, receiver: to } @@ -904,17 +921,17 @@ function TransferModal({ setAutoAccept(e.target.checked)} /> Auto-accept (settle in one step. You own the receiver on LocalNet.) -