File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
app/src/main/java/to/bitkit/repositories Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff 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:" +
You can’t perform that action at this time.
0 commit comments