We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a40ac27 commit b382507Copy full SHA for b382507
app/src/main/java/to/bitkit/ui/sheets/GiftViewModel.kt
@@ -50,6 +50,9 @@ class GiftViewModel @Inject constructor(
50
private var isClaiming: Boolean = false
51
52
fun initialize(code: String, amount: ULong) {
53
+ require(code.isNotBlank()) { "Gift code cannot be blank" }
54
+ require(amount > 0u) { "Gift amount must be positive" }
55
+
56
if (!isClaiming) {
57
viewModelScope.launch {
58
_navigationEvent.emit(GiftRoute.Loading)
0 commit comments