Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcramer committed Nov 26, 2024
1 parent b782f71 commit 67b4805
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
1 change: 1 addition & 0 deletions src/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ONCHAINKIT_WALLETCONNECT_PROJECT_ID=c652d0148879353d7e965d7f6f361e59
30 changes: 13 additions & 17 deletions src/wallet/components/WalletModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function WalletModal({

const modal = modalRef.current;
const focusableElements = modal.querySelectorAll<HTMLElement>(
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
);

// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: TODO: Refactor
Expand Down Expand Up @@ -101,9 +101,7 @@ export function WalletModal({
console.error('Coinbase Wallet connection error:', error);
if (onError) {
onError(
error instanceof Error
? error
: new Error('Failed to connect wallet'),
error instanceof Error ? error : new Error('Failed to connect wallet')
);
}
}
Expand All @@ -122,17 +120,15 @@ export function WalletModal({
console.error('WalletConnect connection error:', error);
if (onError) {
onError(
error instanceof Error
? error
: new Error('Failed to connect wallet'),
error instanceof Error ? error : new Error('Failed to connect wallet')
);
}
}
}, [connect, onClose, onError]);

const handleLinkKeyDown = (
event: React.KeyboardEvent<HTMLAnchorElement>,
url: string,
url: string
) => {
if (event.key === 'Enter') {
event.preventDefault();
Expand All @@ -150,7 +146,7 @@ export function WalletModal({
'fixed inset-0 z-50 flex items-center justify-center',
'bg-black/70 transition-opacity duration-200',
isOpen ? 'opacity-100' : 'opacity-0',
className,
className
)}
onClick={onClose}
onKeyDown={(e) => e.key === 'Enter' && onClose()}
Expand All @@ -169,7 +165,7 @@ export function WalletModal({
'relative',
'-translate-x-1/2 -translate-y-1/2 fixed top-1/2 left-1/2',
'transition-opacity duration-200',
isOpen ? 'opacity-100' : 'opacity-0',
isOpen ? 'opacity-100' : 'opacity-0'
)}
onClick={(e) => e.stopPropagation()}
onKeyDown={(e) => e.key === 'Enter' && e.stopPropagation()}
Expand All @@ -182,14 +178,14 @@ export function WalletModal({
className={cn(
'absolute top-4 right-4',
'flex items-center justify-center',
'h-3 w-3',
'h-3 w-3'
)}
aria-label="Close modal"
>
<div
className={cn(
'relative h-full w-full transition-colors',
'[&>svg>path]:hover:fill-[var(--ock-icon-color-foreground-muted)]',
'[&>svg>path]:hover:fill-[var(--ock-icon-color-foreground-muted)]'
)}
>
{closeSvg}
Expand Down Expand Up @@ -224,7 +220,7 @@ export function WalletModal({
pressable.alternate,
color.foreground,
'h-10 w-[275px] px-4 py-2.5',
'flex items-center justify-between text-left',
'flex items-center justify-between text-left'
)}
>
Sign up
Expand All @@ -241,7 +237,7 @@ export function WalletModal({
background.default,
color.foregroundMuted,
text.legal,
'px-2',
'px-2'
)}
>
or continue with an existing wallet
Expand All @@ -260,7 +256,7 @@ export function WalletModal({
pressable.alternate,
color.foreground,
'h-10 w-[275px] px-4 py-2.5',
'flex items-center justify-between text-left',
'flex items-center justify-between text-left'
)}
>
Coinbase Wallet
Expand All @@ -278,7 +274,7 @@ export function WalletModal({
pressable.alternate,
color.foreground,
'flex h-[40px] w-[275px] px-4 py-2.5',
'items-center justify-between text-left',
'items-center justify-between text-left'
)}
>
Other wallets
Expand All @@ -291,7 +287,7 @@ export function WalletModal({
color.foregroundMuted,
text.legal,
'flex flex-col items-center justify-center gap-1 px-4',
'mt-4 w-[275px] text-center leading-3',
'mt-4 w-[275px] text-center leading-3'
)}
>
<span className="font-normal text-[10px] leading-[13px]">
Expand Down

0 comments on commit 67b4805

Please sign in to comment.