mirror of
https://github.com/coracle-social/flotilla.git
synced 2025-12-10 10:57:04 +00:00
show and copy npub
This commit is contained in:
@@ -242,9 +242,7 @@ export const checkRelayAccess = async (url: string, claim = "") => {
|
|||||||
if (error?.startsWith("mute: ")) return
|
if (error?.startsWith("mute: ")) return
|
||||||
|
|
||||||
// Ignore rejected empty claims
|
// Ignore rejected empty claims
|
||||||
if (!claim && error?.includes("invite code")) {
|
if (!claim && error?.includes("invite code")) return
|
||||||
return `failed to request access to relay`
|
|
||||||
}
|
|
||||||
|
|
||||||
return message
|
return message
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,11 +17,11 @@
|
|||||||
import {pushModal} from "@app/modal"
|
import {pushModal} from "@app/modal"
|
||||||
import {clip} from "@app/toast"
|
import {clip} from "@app/toast"
|
||||||
|
|
||||||
|
const npub = nip19.npubEncode($pubkey!)
|
||||||
const profile = deriveProfile($pubkey!)
|
const profile = deriveProfile($pubkey!)
|
||||||
|
|
||||||
const pubkeyDisplay = displayPubkey($pubkey!)
|
const pubkeyDisplay = displayPubkey($pubkey!)
|
||||||
|
|
||||||
const copyNpub = () => clip(nip19.npubEncode($session!.pubkey))
|
const copyNpub = () => clip(npub)
|
||||||
|
|
||||||
const copyNsec = () => clip(nip19.nsecEncode(hexToBytes($session!.secret!)))
|
const copyNsec = () => clip(nip19.nsecEncode(hexToBytes($session!.secret!)))
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
<label class="input input-bordered flex w-full items-center justify-between gap-2">
|
<label class="input input-bordered flex w-full items-center justify-between gap-2">
|
||||||
<div class="row-2 flex-grow items-center">
|
<div class="row-2 flex-grow items-center">
|
||||||
<Icon icon="link-round" />
|
<Icon icon="link-round" />
|
||||||
<input readonly class="ellipsize flex-grow" value={$session?.pubkey} />
|
<input readonly class="ellipsize flex-grow" value={npub} />
|
||||||
</div>
|
</div>
|
||||||
<Button class="flex items-center" onclick={copyNpub}>
|
<Button class="flex items-center" onclick={copyNpub}>
|
||||||
<Icon icon="copy" />
|
<Icon icon="copy" />
|
||||||
|
|||||||
Reference in New Issue
Block a user