This commit is contained in:
9qeklajc
2026-02-05 01:20:10 +01:00
parent b9890e6ad5
commit 6a5ed9d063
4 changed files with 30 additions and 9 deletions
+12 -6
View File
@@ -202,7 +202,7 @@ export function ChildKeyCreator({
<div className='flex flex-col gap-6'>
<div className='flex flex-col gap-4 sm:flex-row sm:items-end'>
<div className='w-full sm:w-32 space-y-2'>
<div className='w-full space-y-2 sm:w-32'>
<div className='flex items-center justify-between'>
<label className='text-muted-foreground text-[0.7rem] tracking-wider uppercase'>
Number of keys
@@ -238,12 +238,18 @@ export function ChildKeyCreator({
</div>
<div className='flex flex-wrap items-center justify-between gap-4'>
<div className='text-xs text-muted-foreground'>
<div className='text-muted-foreground text-xs'>
{costPerKeyMsats && (
<p>
Cost: <span className="font-medium text-foreground">{costPerKeyMsats * count} mSats</span>
<span className="mx-2 opacity-50">|</span>
Unit Cost: <span className="font-medium text-foreground">{costPerKeyMsats / 1000} sats</span>
Cost:{' '}
<span className='text-foreground font-medium'>
{costPerKeyMsats * count} mSats
</span>
<span className='mx-2 opacity-50'>|</span>
Unit Cost:{' '}
<span className='text-foreground font-medium'>
{costPerKeyMsats / 1000} sats
</span>
</p>
)}
</div>
@@ -251,7 +257,7 @@ export function ChildKeyCreator({
<Button
onClick={handleCreateKey}
disabled={loading || (!!baseUrl && !activeApiKey)}
className='w-full sm:w-auto min-w-[140px]'
className='w-full min-w-[140px] sm:w-auto'
>
{loading ? (
<>
+1 -1
View File
@@ -55,7 +55,7 @@ export function KeyOptions({
<select
value={balanceLimitReset}
onChange={(e) => setBalanceLimitReset(e.target.value)}
className='bg-background flex h-9 w-full rounded-md border border-input px-3 py-1 text-xs shadow-sm transition-colors'
className='bg-background border-input flex h-9 w-full rounded-md border px-3 py-1 text-xs shadow-sm transition-colors'
>
<option value=''>None</option>
<option value='daily'>Daily</option>
@@ -166,7 +166,14 @@ export function CashuPaymentWorkflow({
} finally {
setIsCreatingKey(false);
}
}, [initialToken, baseUrl, onApiKeyCreated, balanceLimit, balanceLimitReset, validityDate]);
}, [
initialToken,
baseUrl,
onApiKeyCreated,
balanceLimit,
balanceLimitReset,
validityDate,
]);
const handleSyncBalance = useCallback(async (): Promise<void> => {
if (!activeApiKey) {
@@ -234,7 +234,15 @@ export function LightningPaymentWorkflow({
} finally {
setIsCreating(false);
}
}, [createAmount, baseUrl, pollInvoiceStatus, onApiKeyCreated, balanceLimit, balanceLimitReset, validityDate]);
}, [
createAmount,
baseUrl,
pollInvoiceStatus,
onApiKeyCreated,
balanceLimit,
balanceLimitReset,
validityDate,
]);
const handleTopupInvoice = useCallback(async (): Promise<void> => {
const amount = parseInt(topupAmount);