Skip to content

Commit 09dcc49

Browse files
committed
chore: lint
1 parent b1f974f commit 09dcc49

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

app/src/main/java/to/bitkit/repositories/ActivityRepo.kt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ class ActivityRepo @Inject constructor(
101101
type: ActivityFilter,
102102
txType: PaymentType,
103103
): Result<Activity> = withContext(bgDispatcher) {
104-
if (paymentHashOrTxId.isEmpty()) return@withContext Result.failure(
105-
IllegalArgumentException("paymentHashOrTxId is empty")
106-
)
104+
if (paymentHashOrTxId.isEmpty()) {
105+
return@withContext Result.failure(
106+
IllegalArgumentException("paymentHashOrTxId is empty")
107+
)
108+
}
107109

108110
return@withContext try {
109111
suspend fun findActivity(): Activity? = getActivities(
@@ -135,9 +137,11 @@ class ActivityRepo @Inject constructor(
135137
}
136138
}
137139

138-
if (activity != null) Result.success(activity) else Result.failure(
139-
IllegalStateException("Activity not found")
140-
)
140+
if (activity != null) {
141+
Result.success(activity)
142+
} else {
143+
Result.failure(IllegalStateException("Activity not found"))
144+
}
141145
} catch (e: Exception) {
142146
Logger.error(
143147
"findActivityByPaymentId error. Parameters:" +

0 commit comments

Comments
 (0)