fix final rate calculation for the National Bank of Kazakhstan (#565)

This commit is contained in:
vigdail
2026-04-29 05:06:22 +05:00
committed by GitHub
parent 416e7cece1
commit da2f1ef410
2 changed files with 3 additions and 3 deletions
@@ -116,7 +116,7 @@ func (e *NationalBankOfKazakhstanExchangeRate) ToLatestExchangeRate(c core.Conte
return nil
}
finalRate := rate / unit
finalRate := unit / rate
if math.IsInf(finalRate, 0) {
log.Warnf(c, "[national_bank_of_kazakhstan_datasource.ToLatestExchangeRate] final exchange rate calculation failed, currency is %s, unit is %s, rate is %s", e.Currency, e.Unit, e.Rate)
return nil