fix(veesp): обновление IP, характеристик и валюты при повторном синке
Docker / build (push) Failing after 21s

Перезапись vcpu/ram/disk/ip на update, fetch VM ips, приоритет валюты из balance API.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-06-29 12:10:47 +07:00
co-authored by Cursor
parent 5983c911f2
commit ce6414c65f
7 changed files with 185 additions and 17 deletions
+9 -5
View File
@@ -32,10 +32,14 @@ export function effectiveAccountBalanceCurrency(
}
export function syncFallbackCurrency(
account: { currency?: string | null; providerBaseCurrency?: string | null },
account: { currency?: string | null; providerBaseCurrency?: string | null; balanceCurrency?: string | null },
options?: { balanceCurrency?: string | null },
): string {
return resolveProviderCurrency(
{ baseCurrency: account.providerBaseCurrency },
account.currency,
)
const accountCur = (account.currency ?? '').trim()
if (accountCur) return accountCur
const freshBalanceCur = (options?.balanceCurrency ?? '').trim()
if (freshBalanceCur) return freshBalanceCur
const storedBalanceCur = (account.balanceCurrency ?? '').trim()
if (storedBalanceCur) return storedBalanceCur
return resolveProviderCurrency({ baseCurrency: account.providerBaseCurrency }, null)
}