mirror of
https://github.com/luminous-devs/lume.git
synced 2024-10-02 09:50:47 +00:00
Merge branch 'main' into feat/ark
This commit is contained in:
commit
6f5ea1229d
@ -2,7 +2,7 @@
|
||||
"name": "lume",
|
||||
"description": "the communication app",
|
||||
"private": true,
|
||||
"version": "2.2.1",
|
||||
"version": "2.2.3",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
|
@ -9,7 +9,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "Lume",
|
||||
"version": "2.2.1"
|
||||
"version": "2.2.3"
|
||||
},
|
||||
"plugins": {
|
||||
"fs": {
|
||||
|
@ -45,7 +45,7 @@ export function ImportAccountScreen() {
|
||||
const localSigner = NDKPrivateKeySigner.generate();
|
||||
|
||||
await ark.createSetting('nsecbunker', '1');
|
||||
await ark.createPrivkey(`${pubkey}-nsecbunker`, localSigner.privateKey);
|
||||
await ark.createPrivkey(`${npub}-nsecbunker`, localSigner.privateKey);
|
||||
|
||||
// open nsecbunker web app in default browser
|
||||
await open('https://app.nsecbunker.com/keys');
|
||||
@ -53,7 +53,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;
|
||||
|
@ -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>
|
||||
|
@ -40,8 +40,9 @@ export const NIP05 = memo(function NIP05({
|
||||
|
||||
const data: NIP05 = await res.json();
|
||||
if (data.names) {
|
||||
if (data.names[localPath.toLowerCase()] !== pubkey) return false;
|
||||
return true;
|
||||
if (data.names[localPath.toLowerCase()] === pubkey) return true;
|
||||
if (data.names[localPath] === pubkey) return true;
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
} catch (e) {
|
||||
@ -60,17 +61,13 @@ export const NIP05 = memo(function NIP05({
|
||||
|
||||
return (
|
||||
<div className="inline-flex items-center gap-1">
|
||||
<p className={twMerge('text-sm font-medium', className)}>{nip05}</p>
|
||||
<p className={twMerge('text-sm font-medium', className)}>
|
||||
{nip05.startsWith('_@') ? nip05.replace('_@', '') : nip05}
|
||||
</p>
|
||||
{data === true ? (
|
||||
<div className="inline-flex h-5 w-max shrink-0 items-center justify-center gap-1 rounded-full bg-teal-500 pl-0.5 pr-1.5 text-xs font-medium text-white">
|
||||
<VerifiedIcon className="h-4 w-4" />
|
||||
Verified
|
||||
</div>
|
||||
<VerifiedIcon className="h-4 w-4 text-teal-500" />
|
||||
) : (
|
||||
<div className="inline-flex h-5 w-max shrink-0 items-center justify-center gap-1.5 rounded-full bg-red-500 pl-0.5 pr-1.5 text-xs font-medium text-white">
|
||||
<UnverifiedIcon className="h-4 w-4" />
|
||||
Unverified
|
||||
</div>
|
||||
<UnverifiedIcon className="h-4 w-4 text-red-500" />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user