Skip to content

Commit

Permalink
bump version & fix using nsecbunker with token
Browse files Browse the repository at this point in the history
  • Loading branch information
reyamir committed Dec 7, 2023
1 parent 0d43c13 commit f2b1458
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"package": {
"productName": "Lume",
"version": "2.2.2"
"version": "2.2.3"
},
"plugins": {
"fs": {
Expand Down
4 changes: 2 additions & 2 deletions src/app/auth/import.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ 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');

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();
Expand Down
6 changes: 3 additions & 3 deletions src/libs/ndk/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/accounts/logout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/shared/layouts/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 0 additions & 2 deletions src/shared/widgets/other/liveUpdater.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f2b1458

Please sign in to comment.