fix(web): конвертировать тарифы VPS в базовую валюту настроек
Docker / build (push) Failing after 21s
Docker / build (push) Failing after 21s
Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -305,6 +305,11 @@ export function formatInProviderCurrency(
|
||||
appSettings: Settings[] | Settings | null,
|
||||
ratesData: RatesData | null,
|
||||
): string {
|
||||
const settings: Partial<Settings> = Array.isArray(appSettings)
|
||||
? (appSettings[0] ?? {})
|
||||
: (appSettings ?? {})
|
||||
const autoConvert = settings.autoConvert !== false
|
||||
if (!autoConvert) return formatCurrency(amount, currency)
|
||||
const converted = convertWithProviderRate(amount, currency, provider, appSettings, ratesData)
|
||||
return formatCurrency(converted.value, converted.currency)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user