diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/UpdateZapAmountDialog.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/UpdateZapAmountDialog.kt
index 13a509257..68ab2cfbd 100644
--- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/UpdateZapAmountDialog.kt
+++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/UpdateZapAmountDialog.kt
@@ -341,7 +341,14 @@ fun UpdateZapAmountContent(
IconButton(
onClick = {
- clipboardManager.getText()?.let { postViewModel.copyFromClipboard(it.text) }
+ val uri = clipboardManager.getText()?.text
+ try {
+ uri?.let {
+ postViewModel.copyFromClipboard(it)
+ }
+ } catch (e: IllegalArgumentException) {
+ accountViewModel.toastManager.toast(R.string.invalid_nip47_uri_title, R.string.invalid_nip47_uri_description)
+ }
},
) {
Icon(
diff --git a/amethyst/src/main/res/values/strings.xml b/amethyst/src/main/res/values/strings.xml
index 56255f73e..ae582b165 100644
--- a/amethyst/src/main/res/values/strings.xml
+++ b/amethyst/src/main/res/values/strings.xml
@@ -787,6 +787,10 @@
Paste from clipboard
+ Invalid NIP-47 URI
+ The URI %1$s is not a valid NIP-47 login URI.
+
+
For the App\'s Interface
Dark, Light or System theme
Automatically load images and GIFs