nos2x: call handle_pubkey

This commit is contained in:
William Casarin 2022-11-18 07:43:47 -08:00
parent c783b430bf
commit 9fb8be6afd
2 changed files with 3 additions and 2 deletions

View file

@ -12,7 +12,7 @@
<script defer src="js/noble-secp256k1.js?v=1"></script>
<script defer src="js/bech32.js?v=1"></script>
<script defer src="js/nostr.js?v=6"></script>
<script defer src="js/damus.js?v=87"></script>
<script defer src="js/damus.js?v=88"></script>
</head>
<body>
<script>

View file

@ -1234,9 +1234,10 @@ async function get_pubkey() {
console.log("window.nostr", window.nostr)
if (window.nostr && window.nostr.getPublicKey) {
console.log("calling window.nostr.getPublicKey()...")
const pubkey = await window.nostr.getPublicKey()
console.log("got %s pubkey from nos2x", pubkey)
return pubkey
return handle_pubkey(pubkey)
}
pubkey = prompt("Enter pubkey (hex or npub)")