Skip to content

Commit

Permalink
fix: remove bitcoin-connect
Browse files Browse the repository at this point in the history
  • Loading branch information
verbiricha committed Dec 18, 2023
1 parent 666802d commit d132efd
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 128 deletions.
21 changes: 21 additions & 0 deletions apps/relays/app/components/pubkey.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"use client";

import { FormattedMessage } from "react-intl";
import { Alert, AlertIcon } from "@chakra-ui/react";

import Profile from "./profile";

export default function Pubkey({ pubkey }: { pubkey?: string }) {
return pubkey ? (
<Profile pubkey={pubkey} />
) : (
<Alert>
<AlertIcon />
<FormattedMessage
id="bad-npub"
description="Error shown when failing to decode npub"
defaultMessage="Could not decode npub"
/>
</Alert>
);
}
2 changes: 2 additions & 0 deletions apps/relays/app/components/relay-summary.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client"

import { useState, useEffect } from "react";

import {
Expand Down
22 changes: 2 additions & 20 deletions apps/relays/app/p/[npub]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
"use client"

import dynamic from "next/dynamic";

import { useMemo } from "react";
import { FormattedMessage } from "react-intl";
import { Alert, AlertIcon } from "@chakra-ui/react";
import { nip19 } from "nostr-tools";

import Layout from "../../components/layout";
const Profile = dynamic(() => import("../../components/profile"), {
ssr: false,
});

import Pubkey from "../../components/pubkey";

export default function ProfilePage({ params }: { params: { npub: string } }) {
// todo: not found msg
Expand All @@ -32,18 +25,7 @@ export default function ProfilePage({ params }: { params: { npub: string } }) {

return (
<Layout>
{pubkey ? (
<Profile pubkey={pubkey} />
) : (
<Alert>
<AlertIcon />
<FormattedMessage
id="bad-npub"
description="Error shown when failing to decode npub"
defaultMessage="Could not decode npub"
/>
</Alert>
)}
<Pubkey pubkey={pubkey} />
</Layout>
);
}
6 changes: 2 additions & 4 deletions apps/relays/app/relay/[nrelay]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import dynamic from "next/dynamic";
"use client";

import Layout from "../../components/layout";
const Relay = dynamic(() => import("../../components/relay"), {
ssr: false,
});
import Relay from "../../components/relay";

export default function RelayPage({ params }: { params: { nrelay: string } }) {
return (
Expand Down
1 change: 0 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"@emoji-mart/react": "^1.1.1",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@getalby/bitcoin-connect-react": "^2.4.3",
"@noble/hashes": "^1.3.3",
"@nostr-dev-kit/ndk": "^2.3.0",
"@scure/base": "^1.1.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/ZapModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
import { FormattedNumber } from "react-intl";
import { generatePrivateKey, getPublicKey } from "nostr-tools";
import { NDKEvent, NDKPrivateKeySigner } from "@nostr-dev-kit/ndk";
import("@getalby/bitcoin-connect-react"); // enable NWC
//import("@getalby/bitcoin-connect-react"); // enable NWC
import { useIntl, FormattedMessage } from "react-intl";

import User from "./User";
Expand Down
102 changes: 0 additions & 102 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit d132efd

@vercel
Copy link

@vercel vercel bot commented on d132efd Dec 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.