Fix: avoid negative numbers in the UI.
This commit is contained in:
parent
436fa5fa74
commit
dcd1e63491
|
@ -150,8 +150,8 @@ class SendAddressFragment : BaseFragment<FragmentSendAddressBinding>(),
|
|||
|
||||
private fun onBalanceUpdated(balance: WalletBalance) {
|
||||
binding.textLayoutAmount.helperText =
|
||||
"You have ${balance.availableZatoshi.convertZatoshiToZecString(8)} available"
|
||||
maxZatoshi = balance.availableZatoshi - ZcashSdk.MINERS_FEE_ZATOSHI
|
||||
"You have ${balance.availableZatoshi.coerceAtLeast(0L).convertZatoshiToZecString(8)} available"
|
||||
maxZatoshi = (balance.availableZatoshi - ZcashSdk.MINERS_FEE_ZATOSHI).coerceAtLeast(0L)
|
||||
}
|
||||
|
||||
override fun onPrimaryClipChanged() {
|
||||
|
|
Loading…
Reference in New Issue