If you try to run this without a valid API key, you just end up with every currency converted to either "Inf" or "0.000000"
In CurrencyViewModel.swift line 55
let currencies = await self.loadData()
let dictData: Dictionary<String, String> = currencies?["data"] as? Dictionary<String, String> ?? [:]
Should be checking currencies?["status"] is 200 and currencies?["message"] is currency_list between those two lines.
Also, once you've run it with a bad key, next time you run it doesn't try to get the JSON again. I couldn't find a way to force it, how to clear the cached data, or follow that code path yet.
If you try to run this without a valid API key, you just end up with every currency converted to either "Inf" or "0.000000"
In
CurrencyViewModel.swift
line 55Should be checking
currencies?["status"]
is200
andcurrencies?["message"]
iscurrency_list
between those two lines.Also, once you've run it with a bad key, next time you run it doesn't try to get the JSON again. I couldn't find a way to force it, how to clear the cached data, or follow that code path yet.