diff --git a/example/index.tsx b/example/index.tsx index 675c8d2..635a915 100644 --- a/example/index.tsx +++ b/example/index.tsx @@ -6,9 +6,9 @@ import * as ReactDOM from 'react-dom'; import { broadcastToRelay, Connect, connectToRelay, ConnectURI } from '@nostr-connect/connect'; import { QRCodeSVG } from 'qrcode.react'; -import { getEventHash, getPublicKey, Event } from 'nostr-tools'; +import { getEventHash, getPublicKey, generatePrivateKey, Event } from 'nostr-tools'; -const secretKey = "5acff99d1ad3e1706360d213fd69203312d9b5e91a2d5f2e06100cc6f686e5b3"; +const secretKey = generatePrivateKey(); const connectURI = new ConnectURI({ target: getPublicKey(secretKey), relay: 'wss://nostr.vulpem.com', @@ -161,21 +161,21 @@ const App = () => { } return ( -
+
-

Nostr Connect Playground

+

Nostr Connect Playground

-

Nostr ID {getPublicKey(secretKey)}

+

Nostr ID {getPublicKey(secretKey)}

-

Status {isConnected() ? '🟢 Connected' : '🔴 Disconnected'}

+

Status {isConnected() ? '🟢 Connected' : '🔴 Disconnected'}

{ isConnected() &&
} @@ -183,7 +183,8 @@ const App = () => {

Connect with Nostr

- + +