Fix crash when attempting to send amounts > max supply

This commit is contained in:
fekt
2023-04-09 10:17:59 -04:00
parent 63e1a2604c
commit ba56233203

View File

@@ -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)