Remove authentication for copying npub

Changelog-Fixed: Remove authentication for copying npub
Closes: #778
This commit is contained in:
Swift
2023-03-14 16:07:32 -04:00
committed by William Casarin
parent 98685645d3
commit 44a59e8d57

View File

@@ -72,6 +72,11 @@ struct ConfigView: View {
self.pubkey_copied = is_pk self.pubkey_copied = is_pk
generator.impactOccurred() generator.impactOccurred()
} }
if is_pk {
// When trying to copy npub
copyKey()
} else {
// When trying to copy nsec
if has_authenticated_locally { if has_authenticated_locally {
copyKey() copyKey()
} else { } else {
@@ -81,6 +86,7 @@ struct ConfigView: View {
} }
} }
} }
}
}) { }) {
let copied = is_pk ? self.pubkey_copied : self.privkey_copied let copied = is_pk ? self.pubkey_copied : self.privkey_copied
Image(systemName: copied ? "checkmark.circle" : "doc.on.doc") Image(systemName: copied ? "checkmark.circle" : "doc.on.doc")