mirror of
https://github.com/lumehq/lume.git
synced 2025-03-18 05:41:53 +01:00
bump version & fix using nsecbunker with token
This commit is contained in:
parent
0d43c13928
commit
f2b1458bd2
@ -2,7 +2,7 @@
|
||||
"name": "lume",
|
||||
"description": "the communication app",
|
||||
"private": true,
|
||||
"version": "2.2.2",
|
||||
"version": "2.2.3",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
|
@ -9,7 +9,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "Lume",
|
||||
"version": "2.2.2"
|
||||
"version": "2.2.3"
|
||||
},
|
||||
"plugins": {
|
||||
"fs": {
|
||||
|
@ -48,7 +48,7 @@ export function ImportAccountScreen() {
|
||||
const localSigner = NDKPrivateKeySigner.generate();
|
||||
|
||||
await db.createSetting('nsecbunker', '1');
|
||||
await db.secureSave(`${pubkey}-nsecbunker`, localSigner.privateKey);
|
||||
await db.secureSave(`${npub}-nsecbunker`, localSigner.privateKey);
|
||||
|
||||
// open nsecbunker web app in default browser
|
||||
await open('https://app.nsecbunker.com/keys');
|
||||
@ -56,7 +56,7 @@ export function ImportAccountScreen() {
|
||||
const bunker = new NDK({
|
||||
explicitRelayUrls: ['wss://relay.nsecbunker.com', 'wss://nostr.vulpem.com'],
|
||||
});
|
||||
bunker.connect();
|
||||
await bunker.connect();
|
||||
|
||||
const remoteSigner = new NDKNip46Signer(bunker, npub, localSigner);
|
||||
await remoteSigner.blockUntilReady();
|
||||
|
@ -31,16 +31,16 @@ export const NDKInstance = () => {
|
||||
try {
|
||||
// NIP-46 Signer
|
||||
if (nsecbunker) {
|
||||
const localSignerPrivkey = await db.secureLoad(`${db.account.pubkey}-nsecbunker`);
|
||||
const localSignerPrivkey = await db.secureLoad(`${db.account.id}-nsecbunker`);
|
||||
if (!localSignerPrivkey) return null;
|
||||
|
||||
const localSigner = new NDKPrivateKeySigner(localSignerPrivkey);
|
||||
const bunker = new NDK({
|
||||
explicitRelayUrls: ['wss://relay.nsecbunker.com', 'wss://nostr.vulpem.com'],
|
||||
});
|
||||
bunker.connect();
|
||||
await bunker.connect();
|
||||
|
||||
const remoteSigner = new NDKNip46Signer(bunker, db.account.id, localSigner);
|
||||
const remoteSigner = new NDKNip46Signer(bunker, db.account.pubkey, localSigner);
|
||||
await remoteSigner.blockUntilReady();
|
||||
|
||||
return remoteSigner;
|
||||
|
@ -19,7 +19,7 @@ export function Logout() {
|
||||
|
||||
// remove private key
|
||||
await db.secureRemove(db.account.pubkey);
|
||||
await db.secureRemove(`${db.account.pubkey}-nsecbunker`);
|
||||
await db.secureRemove(`${db.account.id}-nsecbunker`);
|
||||
|
||||
// logout
|
||||
await db.accountLogout();
|
||||
|
@ -22,7 +22,7 @@ export function NewLayout() {
|
||||
<div className="col-span-1">
|
||||
<Link
|
||||
to="/"
|
||||
className="inline-flex h-10 w-10 items-center justify-center rounded-lg bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-900"
|
||||
className="inline-flex h-10 w-10 items-center justify-center rounded-lg bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-900 dark:hover:bg-neutral-800"
|
||||
>
|
||||
<ArrowLeftIcon className="h-5 w-5" />
|
||||
</Link>
|
||||
|
@ -31,8 +31,6 @@ export function LiveUpdater({ status }: { status: QueryStatus }) {
|
||||
let sub: NDKSubscription = undefined;
|
||||
|
||||
if (status === 'success' && db.account && db.account?.contacts?.length > 0) {
|
||||
queryClient.fetchQuery({ queryKey: ['notification'] });
|
||||
|
||||
const filter: NDKFilter = {
|
||||
kinds: [NDKKind.Text, NDKKind.Repost],
|
||||
authors: db.account.contacts,
|
||||
|
Loading…
x
Reference in New Issue
Block a user