Skip to content

Commit f647a2f

Browse files
committed
[Playground-Web] Feature: Added Glyph Wallet
1 parent 6af732e commit f647a2f

File tree

5 files changed

+436
-33
lines changed

5 files changed

+436
-33
lines changed

apps/playground-web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"dependencies": {
33
"@abstract-foundation/agw-react": "^1.6.4",
4+
"@use-glyph/sdk-react": "1.2.2",
45
"@ai-sdk/react": "^2.0.25",
56
"@hookform/resolvers": "^3.9.1",
67
"@radix-ui/react-avatar": "^1.1.10",

apps/playground-web/src/app/wallets/sign-in/button/RightSection.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { abstractWallet } from "@abstract-foundation/agw-react/thirdweb";
2+
import { glyphWalletTW } from "@use-glyph/sdk-react";
23
import { XIcon } from "lucide-react";
34
import { usePathname } from "next/navigation";
45
import { useEffect, useState } from "react";
56
import {
67
abstract,
8+
apechain,
79
arbitrum,
810
arbitrumSepolia,
911
base,
@@ -126,6 +128,7 @@ export function RightSection(props: {
126128
optimism,
127129
arbitrum,
128130
abstract,
131+
apechain,
129132
sepolia,
130133
baseSepolia,
131134
optimismSepolia,
@@ -185,7 +188,7 @@ export function RightSection(props: {
185188
// TODO: should show the expanded connected modal here instead
186189
connectButton
187190
) : (
188-
<div className="relative overflow-hidden">
191+
<div className="overflow-hidden relative">
189192
<ConnectEmbed
190193
accountAbstraction={
191194
connectOptions.enableAccountAbstraction
@@ -214,7 +217,7 @@ export function RightSection(props: {
214217
/>
215218
{/* Fake X icon to make it looks exactly like a modal */}
216219
<XIcon
217-
className="absolute top-6 right-6 size-6 cursor-not-allowed"
220+
className="absolute top-6 right-6 cursor-not-allowed size-6"
218221
style={{
219222
color: themeObj.colors.secondaryIconColor,
220223
}}
@@ -238,6 +241,8 @@ function getWallets(connectOptions: ConnectPlaygroundOptions) {
238241
...connectOptions.walletIds.map((id) => {
239242
if (id === "xyz.abs") {
240243
return abstractWallet();
244+
} if( id === "io.useglyph") {
245+
return glyphWalletTW();
241246
}
242247
return createWallet(id);
243248
}),
@@ -283,7 +288,7 @@ function TabButtons(props: {
283288
}) {
284289
return (
285290
<div>
286-
<div className="flex justify-start gap-1 rounded-lg border bg-card p-1 md:inline-flex">
291+
<div className="flex gap-1 justify-start p-1 rounded-lg border bg-card md:inline-flex">
287292
{props.tabs.map((tab) => (
288293
<Button
289294
className={cn(

apps/playground-web/src/components/styled-connect-button.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { useTheme } from "next-themes";
44
import {
55
abstract,
6+
apechain,
67
arbitrum,
78
arbitrumSepolia,
89
base,
@@ -33,6 +34,7 @@ export function StyledConnectButton(
3334
polygonAmoy,
3435
arbitrumSepolia,
3536
abstract,
37+
apechain,
3638
base,
3739
ethereum,
3840
polygon,

apps/playground-web/src/components/styled-connect-embed.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { useTheme } from "next-themes";
44
import {
55
abstract,
6+
apechain,
67
arbitrum,
78
arbitrumSepolia,
89
base,
@@ -47,6 +48,7 @@ export function StyledConnectEmbed(
4748
polygonAmoy,
4849
arbitrumSepolia,
4950
abstract,
51+
apechain,
5052
]}
5153
client={THIRDWEB_CLIENT}
5254
className="!max-w-full"

0 commit comments

Comments
 (0)