We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1cf5f37 commit 4a5061fCopy full SHA for 4a5061f
1 file changed
app/src/main/java/to/bitkit/data/widgets/PriceService.kt
@@ -38,9 +38,9 @@ class PriceService @Inject constructor(
38
override val refreshInterval = 1.minutes
39
private val sourceLabel = "Bitfinex.com"
40
41
- override suspend fun fetchData(): Result<PriceDTO> {
+ override suspend fun fetchData(): Result<PriceDTO> = runCatching {
42
val period = widgetsStore.data.first().pricePreferences.period ?: GraphPeriod.ONE_DAY
43
- return fetchData(period)
+ fetchData(period).getOrThrow()
44
}
45
46
suspend fun fetchData(period: GraphPeriod): Result<PriceDTO> = runCatching {
0 commit comments