Skip to content

Commit f249710

Browse files
committed
Fix comment
1 parent fdf7516 commit f249710

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,9 @@ class BlocktankRepo @Inject constructor(
411411
waitTimeout: kotlin.time.Duration = kotlin.time.Duration.parse("30s"),
412412
): Result<GiftClaimResult> = withContext(bgDispatcher) {
413413
runCatching {
414+
require(code.isNotBlank()) { "Gift code cannot be blank" }
415+
require(amount > 0u) { "Gift amount must be positive" }
416+
414417
lightningRepo.executeWhenNodeRunning(
415418
operationName = "claimGiftCode",
416419
waitTimeout = waitTimeout,

app/src/main/java/to/bitkit/ui/sheets/GiftViewModel.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ class GiftViewModel @Inject constructor(
4444
private var isClaiming: Boolean = false
4545

4646
fun initialize(code: String, amount: ULong) {
47-
require(code.isNotBlank()) { "Gift code cannot be blank" }
48-
require(amount > 0u) { "Gift amount must be positive" }
49-
5047
if (!isClaiming) {
5148
viewModelScope.launch {
5249
_navigationEvent.emit(GiftRoute.Loading)

0 commit comments

Comments
 (0)