mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-27 20:17:05 +02:00
fix build
This commit is contained in:
@@ -104,6 +104,7 @@ class AccountService {
|
|||||||
db.put("accounts", account);
|
db.put("accounts", account);
|
||||||
}
|
}
|
||||||
addFromNostrConnect(client: NostrConnectClient) {
|
addFromNostrConnect(client: NostrConnectClient) {
|
||||||
|
if (!client.pubkey) throw new Error("Cant add client without pubkey");
|
||||||
this.addAccount({
|
this.addAccount({
|
||||||
type: "nostr-connect",
|
type: "nostr-connect",
|
||||||
signerRelays: client.relays,
|
signerRelays: client.relays,
|
||||||
|
@@ -103,7 +103,7 @@ export default function LoginNostrAddressCreate() {
|
|||||||
|
|
||||||
nostrConnectService.saveClient(client);
|
nostrConnectService.saveClient(client);
|
||||||
accountService.addFromNostrConnect(client);
|
accountService.addFromNostrConnect(client);
|
||||||
accountService.switchAccount(client.pubkey);
|
accountService.switchAccount(client.pubkey!);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof Error) toast({ description: e.message, status: "error" });
|
if (e instanceof Error) toast({ description: e.message, status: "error" });
|
||||||
}
|
}
|
||||||
|
@@ -47,7 +47,7 @@ export default function LoginNostrAddressView() {
|
|||||||
|
|
||||||
nostrConnectService.saveClient(client);
|
nostrConnectService.saveClient(client);
|
||||||
accountService.addFromNostrConnect(client);
|
accountService.addFromNostrConnect(client);
|
||||||
accountService.switchAccount(client.pubkey);
|
accountService.switchAccount(client.pubkey!);
|
||||||
} else {
|
} else {
|
||||||
accountService.addAccount({
|
accountService.addAccount({
|
||||||
type: "pubkey",
|
type: "pubkey",
|
||||||
|
Reference in New Issue
Block a user