File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
app/src/main/java/to/bitkit Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff 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,
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments