File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
app/src/main/java/to/bitkit/repositories Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -420,19 +420,17 @@ class BlocktankRepo @Inject constructor(
420420 operationName = " claimGiftCode" ,
421421 waitTimeout = waitTimeout,
422422 ) {
423- Result .success(Unit )
424- }.getOrThrow()
425-
426- delay(PEER_CONNECTION_DELAY_MS )
423+ delay(PEER_CONNECTION_DELAY_MS )
427424
428- val channels = lightningRepo.getChannelsAsync().getOrThrow()
429- val maxInboundCapacity = channels.calculateRemoteBalance()
425+ val channels = lightningRepo.getChannelsAsync().getOrThrow()
426+ val maxInboundCapacity = channels.calculateRemoteBalance()
430427
431- if (maxInboundCapacity >= amount) {
432- claimGiftCodeWithLiquidity(code)
433- } else {
434- claimGiftCodeWithoutLiquidity(code, amount)
435- }
428+ if (maxInboundCapacity >= amount) {
429+ Result .success(claimGiftCodeWithLiquidity(code))
430+ } else {
431+ Result .success(claimGiftCodeWithoutLiquidity(code, amount))
432+ }
433+ }.getOrThrow()
436434 }.onFailure { e ->
437435 Logger .error(" Failed to claim gift code" , e, context = TAG )
438436 }
You can’t perform that action at this time.
0 commit comments