fix: use fiat code from env in command queue poller
The command poller hardcoded 'GTQ' as the currency for manual dispense transactions. Now reads VITE_LAMASSU_FIAT_CODE from env, defaulting to 'USD'. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c10e3239b5
commit
902c8ab6cb
1 changed files with 2 additions and 1 deletions
|
|
@ -396,6 +396,7 @@ function startCommandPoller(): void {
|
|||
const result = await halInstance.dispenseCash(parsed.bills)
|
||||
const txid = `manual-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`
|
||||
const totalFiatCents = parsed.bills.reduce((s, b) => s + b.denomination * b.count * 100, 0)
|
||||
const fiatCode = process.env.VITE_LAMASSU_FIAT_CODE || 'USD'
|
||||
|
||||
recordTransaction({
|
||||
txid,
|
||||
|
|
@ -406,7 +407,7 @@ function startCommandPoller(): void {
|
|||
feeSats: 0,
|
||||
feePercent: 0,
|
||||
exchangeRate: 0,
|
||||
currency: 'GTQ',
|
||||
currency: fiatCode,
|
||||
bills: parsed.bills,
|
||||
cassettes: result.cassettes,
|
||||
error: result.error,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue