From d1692edb63336cf3f5d8ebb3c30db4a4ed003dcc Mon Sep 17 00:00:00 2001 From: 9qeklajc Date: Sat, 7 Feb 2026 00:13:57 +0100 Subject: [PATCH] no balance limit for parent key --- routstr/balance.py | 4 +-- ui/components/key-options.tsx | 30 +++++++++++-------- .../landing/cashu-payment-workflow.tsx | 1 + .../landing/lightning-payment-workflow.tsx | 1 + 4 files changed, 21 insertions(+), 15 deletions(-) diff --git a/routstr/balance.py b/routstr/balance.py index 6a2c8253..537a5324 100644 --- a/routstr/balance.py +++ b/routstr/balance.py @@ -186,11 +186,11 @@ async def refund_wallet_endpoint( bearer_value: str = authorization[7:] + key: ApiKey = await validate_bearer_key(bearer_value, session) + if cached := await _refund_cache_get(bearer_value): return cached - key: ApiKey = await validate_bearer_key(bearer_value, session) - if key.parent_key_hash: raise HTTPException( status_code=400, diff --git a/ui/components/key-options.tsx b/ui/components/key-options.tsx index 63c0fa5e..63969e72 100644 --- a/ui/components/key-options.tsx +++ b/ui/components/key-options.tsx @@ -8,6 +8,7 @@ interface KeyOptionsProps { setValidityDate: (val: string) => void; balanceLimitReset: string; setBalanceLimitReset: (val: string) => void; + showBalanceLimit?: boolean; } export function KeyOptions({ @@ -17,22 +18,25 @@ export function KeyOptions({ setValidityDate, balanceLimitReset, setBalanceLimitReset, + showBalanceLimit = true, }: KeyOptionsProps) { return (
-
- - setBalanceLimit(e.target.value)} - className='h-9 text-xs' - /> -
+ {showBalanceLimit && ( +
+ + setBalanceLimit(e.target.value)} + className='h-9 text-xs' + /> +
+ )}