Browse Source

Fix crash when attempting to send amounts > max supply

pull/3/head
fekt 1 year ago
parent
commit
ba56233203
  1. 1
      sdk-lib/src/main/java/cash/z/ecc/android/sdk/model/Zatoshi.kt

1
sdk-lib/src/main/java/cash/z/ecc/android/sdk/model/Zatoshi.kt

@ -10,7 +10,6 @@ package cash.z.ecc.android.sdk.model
data class Zatoshi(val value: Long) : Comparable<Zatoshi> {
init {
require(value >= MIN_INCLUSIVE) { "Zatoshi must be in the range [$MIN_INCLUSIVE, $MAX_INCLUSIVE]" }
require(value <= MAX_INCLUSIVE) { "Zatoshi must be in the range [$MIN_INCLUSIVE, $MAX_INCLUSIVE]" }
}
operator fun plus(other: Zatoshi) = Zatoshi(value + other.value)

Loading…
Cancel
Save