perf: reduce CPU usage on Bay Trail ATM hardware

- Remove infinite box-shadow glow animations from Buy/Sell buttons
  on idle screen (expensive on CPU without GPU)
- Reduce BTC price polling from 10s to 30s
- Reduce LNURL-withdraw polling from 2s to 5s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Patrick Mulligan 2026-03-02 14:26:42 -05:00
commit b7858a08c7
3 changed files with 4 additions and 6 deletions

View file

@ -299,7 +299,7 @@ function startLnurlCompletionPolling(
} catch (e) {
console.warn('[LNURL Poll] Error checking status:', e)
}
}, 2000) // Poll every 2 seconds
}, 5000) // Poll every 5 seconds
// Store cleanup function
const session = lnurlSessions.get(uniqueHash)

View file

@ -998,7 +998,7 @@ export const useAtmStore = defineStore('atm', () => {
else if (currency === 'USD' && localPrice !== null) btcPriceUsd.value = localPrice
}
poll() // immediate first fetch
pricePollingInterval = setInterval(poll, 10_000)
pricePollingInterval = setInterval(poll, 30_000)
}
function stopPricePolling() {

View file

@ -120,8 +120,7 @@ function handleCashOut() {
>
<!-- Buy Bitcoin -->
<button
class="flex aspect-square w-40 lg:w-[36vh] flex-col items-center justify-center gap-1.5 lg:gap-4 rounded-full border-2 border-bitcoin/50 bg-bitcoin/10 transition-all active:scale-[0.97] animate-zone-glow"
style="--glow-color: var(--bitcoin)"
class="flex aspect-square w-40 lg:w-[36vh] flex-col items-center justify-center gap-1.5 lg:gap-4 rounded-full border-2 border-bitcoin/50 bg-bitcoin/10 transition-all active:scale-[0.97]"
@click="handleCashIn"
>
<BitcoinIcon :size="100" class="shrink-0 w-10 h-10 lg:w-[100px] lg:h-[100px]" />
@ -133,8 +132,7 @@ function handleCashOut() {
<!-- Sell Bitcoin -->
<button
class="flex aspect-square w-40 lg:w-[36vh] flex-col items-center justify-center gap-1.5 lg:gap-4 rounded-full border-2 border-success/50 bg-success/10 transition-all active:scale-[0.97] animate-zone-glow"
style="--glow-color: var(--success)"
class="flex aspect-square w-40 lg:w-[36vh] flex-col items-center justify-center gap-1.5 lg:gap-4 rounded-full border-2 border-success/50 bg-success/10 transition-all active:scale-[0.97]"
@click="handleCashOut"
>
<span class="text-4xl lg:text-[8vh] leading-none">💵</span>