Skip to content

Commit bb2c6b5

Browse files
Remove some wallets from website (#49)
1 parent da79065 commit bb2c6b5

File tree

5 files changed

+58
-63
lines changed

5 files changed

+58
-63
lines changed

.github/workflows/static.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- name: Setup Node
2727
uses: actions/setup-node@v4
28-
28+
2929
- name: Install dependencies
3030
uses: bahmutov/npm-install@v1
3131
with:
@@ -41,9 +41,8 @@ jobs:
4141
- name: Upload artifact
4242
uses: actions/upload-pages-artifact@v3
4343
with:
44-
path: './www/dist'
44+
path: "./www/dist"
4545

4646
- name: Deploy to GitHub Pages
4747
id: deployment
4848
uses: actions/deploy-pages@v4
49-

www/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
8-
"build": "vite build",
9-
"lint": "eslint .",
8+
"build": "tsc -b && vite build",
9+
"lint": "eslint . && tsc -b",
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {

www/src/App.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
// const defaultVerifyFormData = {
2-
// address: "bc1ppv609nr0vr25u07u95waq5lucwfm6tde4nydujnu8npg4q75mr5sxq8lt3",
3-
// message: "Hello World",
4-
// signature:
5-
// "AUHd69PrJQEv+oKTfZ8l+WROBHuy9HKrbFCJu7U1iK2iiEy1vMU5EfMtjc+VSHM7aU0SDbak5IUZRVno2P5mjSafAQ==",
6-
// };
7-
81
import { useEffect, useState } from "react";
92
import {
103
useLaserEyes,

www/src/components/AnimatedContainer.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
import { useRef, useEffect, useState } from "react";
22

3-
const AnimatedContainer = ({ children, isExpanded }) => {
4-
const contentRef = useRef(null);
3+
interface AnimatedContainerProps {
4+
children: React.ReactNode;
5+
isExpanded: boolean;
6+
}
7+
8+
const AnimatedContainer: React.FC<AnimatedContainerProps> = ({
9+
children,
10+
isExpanded,
11+
}) => {
12+
const contentRef = useRef() as React.MutableRefObject<HTMLDivElement>;
513
const [height, setHeight] = useState("calc(var(--font-large) + 3rem)");
614

715
useEffect(() => {
816
const rafId = requestAnimationFrame(() => {
917
if (contentRef.current) {
10-
const newHeight = contentRef.current.scrollHeight;
18+
const newHeight = contentRef.current?.scrollHeight;
1119
setHeight(
1220
isExpanded ? `${newHeight}px` : "calc(var(--font-large) + 3rem)"
1321
);

www/src/components/ConnectWallet.tsx

Lines changed: 43 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,22 @@
11
import { Button } from "@/components/ui/button";
2-
import {
3-
SUPPORTED_WALLETS,
4-
WalletIcon,
5-
UNISAT,
6-
MAGIC_EDEN,
7-
OYL,
8-
PHANTOM,
9-
LEATHER,
10-
XVERSE,
11-
OKX,
12-
} from "@omnisat/lasereyes";
2+
import { SUPPORTED_WALLETS, WalletIcon } from "@omnisat/lasereyes";
133
import FormWrapper from "./FormWrapper";
144

5+
type WalletName =
6+
| "unisat"
7+
| "magic-eden"
8+
| "oyl"
9+
| "phantom"
10+
| "leather"
11+
| "xverse"
12+
| "okx";
13+
1514
interface ConnectWalletFormProps {
1615
provider: string | null;
1716
hasWallet: {
1817
[key: string]: boolean;
1918
};
20-
onConnect: (
21-
walletName:
22-
| typeof UNISAT
23-
| typeof MAGIC_EDEN
24-
| typeof OYL
25-
| typeof PHANTOM
26-
| typeof LEATHER
27-
| typeof XVERSE
28-
| typeof OKX
29-
) => Promise<void>;
19+
onConnect: (walletName: WalletName) => Promise<void>;
3020
onDisconnect: () => void;
3121
}
3222
const ConnectWalletForm = ({
@@ -48,35 +38,40 @@ const ConnectWalletForm = ({
4838
return (
4939
<FormWrapper title="connect wallet" onBack={onDisconnect}>
5040
<div className="grid grid-cols-3 gap-4">
51-
{Object.values(SUPPORTED_WALLETS).map((wallet) => {
52-
const isMissingWallet = !hasWallet[wallet.name];
53-
return (
54-
<div key={wallet.name} className="w-full">
55-
{isMissingWallet ? (
56-
<Button
57-
asChild
58-
className={`${baseButtonClass} bg-transparent/5 backdrop-blur-sm`}
59-
>
60-
<a
61-
href={wallet.url}
62-
target="_blank"
63-
rel="noopener noreferrer"
64-
className="flex items-center justify-center"
41+
{Object.values(SUPPORTED_WALLETS)
42+
.filter(
43+
(wallet) => wallet.name !== "op_net" && wallet.name !== "wizz"
44+
)
45+
.map((wallet) => {
46+
console.log(wallet);
47+
const isMissingWallet = !hasWallet[wallet.name];
48+
return (
49+
<div key={wallet.name} className="w-full">
50+
{isMissingWallet ? (
51+
<Button
52+
asChild
53+
className={`${baseButtonClass} bg-transparent/5 backdrop-blur-sm`}
54+
>
55+
<a
56+
href={wallet.url}
57+
target="_blank"
58+
rel="noopener noreferrer"
59+
className="flex items-center justify-center"
60+
>
61+
<WalletIcon walletName={wallet.name} size={40} />
62+
</a>
63+
</Button>
64+
) : (
65+
<Button
66+
className={`${baseButtonClass} bg-white/90 text-black backdrop-blur-sm`}
67+
onClick={() => onConnect(wallet.name as WalletName)}
6568
>
6669
<WalletIcon walletName={wallet.name} size={40} />
67-
</a>
68-
</Button>
69-
) : (
70-
<Button
71-
className={`${baseButtonClass} bg-white/90 text-black backdrop-blur-sm`}
72-
onClick={() => onConnect(wallet.name)}
73-
>
74-
<WalletIcon walletName={wallet.name} size={40} />
75-
</Button>
76-
)}
77-
</div>
78-
);
79-
})}
70+
</Button>
71+
)}
72+
</div>
73+
);
74+
})}
8075
</div>
8176
</FormWrapper>
8277
);

0 commit comments

Comments
 (0)