mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-04 19:05:14 +02:00
Fixes Possible crash when typing invalid keys
This commit is contained in:
@@ -115,7 +115,11 @@ class UpdateZapAmountViewModel : ViewModel() {
|
||||
|
||||
if (walletConnectRelay.text.isNotBlank() && walletConnectPubkey.text.isNotBlank()) {
|
||||
val unverifiedPrivKey = walletConnectSecret.text.ifBlank { null }
|
||||
val privKey = unverifiedPrivKey?.let { decodePublicKey(it).toHexKey() }
|
||||
val privKey = try {
|
||||
unverifiedPrivKey?.let { decodePublicKey(it).toHexKey() }
|
||||
} catch (e: Exception) {
|
||||
null
|
||||
}
|
||||
|
||||
account?.changeZapPaymentRequest(
|
||||
Nip47URI(
|
||||
|
Reference in New Issue
Block a user