Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvoskamp committed Jan 16, 2025
2 parents 3b84510 + 7296a32 commit b333d3d
Show file tree
Hide file tree
Showing 1,337 changed files with 8,364 additions and 4,660 deletions.
23 changes: 23 additions & 0 deletions .changeset/dull-turkeys-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@reown/appkit': patch
'@reown/appkit-adapter-bitcoin': patch
'@reown/appkit-adapter-ethers': patch
'@reown/appkit-adapter-ethers5': patch
'@reown/appkit-adapter-solana': patch
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'@reown/appkit-cli': patch
'@reown/appkit-common': patch
'@reown/appkit-core': patch
'@reown/appkit-experimental': patch
'@reown/appkit-polyfills': patch
'@reown/appkit-scaffold-ui': patch
'@reown/appkit-siwe': patch
'@reown/appkit-siwx': patch
'@reown/appkit-ui': patch
'@reown/appkit-wallet': patch
'@reown/appkit-wallet-button': patch
---

Fix condition for unsupported chain for `chainChanged` event on wallet connect event
23 changes: 23 additions & 0 deletions .changeset/eight-forks-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@reown/appkit': patch
'@reown/appkit-adapter-bitcoin': patch
'@reown/appkit-adapter-ethers': patch
'@reown/appkit-adapter-ethers5': patch
'@reown/appkit-adapter-solana': patch
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'@reown/appkit-cli': patch
'@reown/appkit-common': patch
'@reown/appkit-core': patch
'@reown/appkit-experimental': patch
'@reown/appkit-polyfills': patch
'@reown/appkit-scaffold-ui': patch
'@reown/appkit-siwe': patch
'@reown/appkit-siwx': patch
'@reown/appkit-ui': patch
'@reown/appkit-wallet': patch
'@reown/appkit-wallet-button': patch
---

Add default value if namespace is not available on upa getAccounts
23 changes: 23 additions & 0 deletions .changeset/few-birds-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@reown/appkit-adapter-bitcoin': patch
'@reown/appkit-adapter-ethers': patch
'@reown/appkit-adapter-ethers5': patch
'@reown/appkit-adapter-solana': patch
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'@reown/appkit-cli': patch
'@reown/appkit-common': patch
'@reown/appkit-core': patch
'@reown/appkit-experimental': patch
'@reown/appkit-polyfills': patch
'@reown/appkit-scaffold-ui': patch
'@reown/appkit-siwe': patch
'@reown/appkit-siwx': patch
'@reown/appkit-ui': patch
'@reown/appkit-wallet': patch
'@reown/appkit-wallet-button': patch
---

Fix BitcoinAdapter `switchNetwork` function execution
23 changes: 23 additions & 0 deletions .changeset/nine-frogs-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@reown/appkit-adapter-ethers5': patch
'@reown/appkit-adapter-ethers': patch
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit': patch
'@reown/appkit-core': patch
'@reown/appkit-adapter-bitcoin': patch
'@reown/appkit-adapter-solana': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'@reown/appkit-cli': patch
'@reown/appkit-common': patch
'@reown/appkit-experimental': patch
'@reown/appkit-polyfills': patch
'@reown/appkit-scaffold-ui': patch
'@reown/appkit-siwe': patch
'@reown/appkit-siwx': patch
'@reown/appkit-ui': patch
'@reown/appkit-wallet': patch
'@reown/appkit-wallet-button': patch
---

Add defaultAccountTypes option for AppKit initialization.
23 changes: 23 additions & 0 deletions .changeset/rich-monkeys-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@reown/appkit': patch
'@reown/appkit-adapter-bitcoin': patch
'@reown/appkit-adapter-ethers': patch
'@reown/appkit-adapter-ethers5': patch
'@reown/appkit-adapter-solana': patch
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'@reown/appkit-cli': patch
'@reown/appkit-common': patch
'@reown/appkit-core': patch
'@reown/appkit-experimental': patch
'@reown/appkit-polyfills': patch
'@reown/appkit-scaffold-ui': patch
'@reown/appkit-siwe': patch
'@reown/appkit-siwx': patch
'@reown/appkit-ui': patch
'@reown/appkit-wallet': patch
'@reown/appkit-wallet-button': patch
---

Refactors connectExternal to call switch network if wallet's active chain is not in requested networks list
23 changes: 23 additions & 0 deletions .changeset/sour-rules-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@reown/appkit-adapter-bitcoin': patch
'@reown/appkit-adapter-ethers5': patch
'@reown/appkit-adapter-ethers': patch
'@reown/appkit-adapter-solana': patch
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'@reown/appkit-cli': patch
'@reown/appkit-common': patch
'@reown/appkit-core': patch
'@reown/appkit-experimental': patch
'@reown/appkit-polyfills': patch
'@reown/appkit-scaffold-ui': patch
'@reown/appkit-siwe': patch
'@reown/appkit-siwx': patch
'@reown/appkit-ui': patch
'@reown/appkit-wallet': patch
'@reown/appkit-wallet-button': patch
---

Refactor to add WalletConnectConnector as extensible class and remove replicated code around adapters
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.changeset
coverage
pnpm-lock.yaml
.nuxt
.nuxt
.svelte-kit
14 changes: 13 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,17 @@
"tabWidth": 2,
"trailingComma": "none",
"singleAttributePerLine": false,
"semi": false
"semi": false,
"importOrder": [
"^(react|react-dom)(.*)$",
"<THIRD_PARTY_MODULES>",
"^(lit|lit/)(.*)$",
"^@reown/(.*)$",
"^@/(.*)$",
"^[./]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"plugins": ["@trivago/prettier-plugin-sort-imports"],
"importOrderParserPlugins": ["typescript", "jsx", "decorators-legacy"]
}
7 changes: 4 additions & 3 deletions apps/browser-extension/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import './globals.css'
import { WagmiProvider } from 'wagmi'
import { wagmiConfig } from './core/wagmi'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { WagmiProvider } from 'wagmi'

import { Box } from './components/Box'
import { wagmiConfig } from './core/wagmi'
import './globals.css'
import { Home } from './pages/Home'

const queryClient = new QueryClient()
Expand Down
6 changes: 4 additions & 2 deletions apps/browser-extension/src/components/Box/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { createElement, forwardRef, type AllHTMLAttributes, type ElementType } from 'react'
import { type AllHTMLAttributes, type ElementType, createElement, forwardRef } from 'react'

import clsx, { type ClassValue } from 'clsx'
import { atoms, type Atoms } from '../../css/atoms'

import { type Atoms, atoms } from '../../css/atoms'
import { sprinkles } from '../../css/sprinkless.css'

type HTMLProperties = Omit<AllHTMLAttributes<HTMLElement>, 'as' | 'className'>
Expand Down
8 changes: 4 additions & 4 deletions apps/browser-extension/src/components/IconButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Box } from '../Box'
import { touchableStyles } from '../../css/touchableStyles'
import { ArrowRightUp } from '../ArrowRightUp'
import { Copy } from '../Copy'
import { Text } from '../Text'
import { Box } from '../Box'
import { Checkmark } from '../Checkmark'
import { Copy } from '../Copy'
import { Switch } from '../Switch'
import { touchableStyles } from '../../css/touchableStyles'
import { Text } from '../Text'

const icons = {
copy: <Copy />,
Expand Down
3 changes: 2 additions & 1 deletion apps/browser-extension/src/core/EvmProvider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import EventEmitter from 'eventemitter3'
import { EIP1193Parameters } from 'viem'

import { createReownTransport } from './transport'
import EventEmitter from 'eventemitter3'

const transport = createReownTransport()

Expand Down
5 changes: 3 additions & 2 deletions apps/browser-extension/src/core/SolanaProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/ban-ts-comment */
import { SOLANA_CHAINS } from '@solana/wallet-standard'
import { ConstantsUtil } from '../utils/ConstantsUtil'
import { Keypair, PublicKey } from '@solana/web3.js'
import { AccountUtil } from '../utils/AccountUtil'
import { WalletAccount } from '@wallet-standard/core'
import nacl from 'tweetnacl'

import { AccountUtil } from '../utils/AccountUtil'
import { ConstantsUtil } from '../utils/ConstantsUtil'

const keypair = Keypair.fromSecretKey(AccountUtil.privateKeySolana)
const publicKey = keypair.publicKey

Expand Down
9 changes: 5 additions & 4 deletions apps/browser-extension/src/core/transport.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { createWalletClient, EIP1193Parameters, EIP1193Provider, fromHex, http, toHex } from 'viem'
import { ChainId, wagmiConfig } from './wagmi'
import { AccountUtil } from '../utils/AccountUtil'
import { getPublicClient } from '@wagmi/core'
import { EIP1193Parameters, EIP1193Provider, createWalletClient, fromHex, http, toHex } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { sepolia } from 'viem/chains'
import { getPublicClient } from '@wagmi/core'

import { AccountUtil } from '../utils/AccountUtil'
import { ChainId, wagmiConfig } from './wagmi'

// -- Constants -----------------------------------------------------------------
const LOCAL_STORAGE_KEYS = {
Expand Down
3 changes: 2 additions & 1 deletion apps/browser-extension/src/css/sprinkless.css.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { createSprinkles, defineProperties } from '@vanilla-extract/sprinkles'
import { colors, spacing, borderRadius } from '@reown/appkit-ui-new'

import { borderRadius, colors, spacing } from '@reown/appkit-ui-new'

const flexAlignments = ['flex-start', 'flex-end', 'center']

Expand Down
2 changes: 1 addition & 1 deletion apps/browser-extension/src/hooks/useBalance.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { clusterApiUrl, Connection, LAMPORTS_PER_SOL, PublicKey } from '@solana/web3.js'
import { Connection, LAMPORTS_PER_SOL, PublicKey, clusterApiUrl } from '@solana/web3.js'
import { useQuery } from '@tanstack/react-query'
import Big from 'big.js'
import { Address, formatEther } from 'viem'
Expand Down
1 change: 1 addition & 0 deletions apps/browser-extension/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import React from 'react'
import ReactDOM from 'react-dom/client'

import App from './App'

const root = ReactDOM.createRoot(document.getElementById('app')!)
Expand Down
5 changes: 3 additions & 2 deletions apps/browser-extension/src/inpage.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { registerWallet } from '@wallet-standard/core'
import { announceProvider } from 'mipd'
import { ConstantsUtil } from './utils/ConstantsUtil'
import { v4 as uuidv4 } from 'uuid'
import { registerWallet } from '@wallet-standard/core'

import { EvmProvider } from './core/EvmProvider'
import { SolanaProvider } from './core/SolanaProvider'
import { ConstantsUtil } from './utils/ConstantsUtil'

const evmProvider = new EvmProvider()
const solanaProvider = new SolanaProvider()
Expand Down
16 changes: 9 additions & 7 deletions apps/browser-extension/src/pages/Home/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { useMemo, useState } from 'react'

import { Keypair } from '@solana/web3.js'
import Big from 'big.js'
import { privateKeyToAccount } from 'viem/accounts'

import { Box } from '../../components/Box'
import { IconButton, IconButtonKey } from '../../components/IconButton'
import { Text } from '../../components/Text'
import { Token } from '../../components/Token'
import { Zorb } from '../../components/Zorb'
import { privateKeyToAccount } from 'viem/accounts'
import { useBalance } from '../../hooks/useBalance'
import { AccountUtil } from '../../utils/AccountUtil'
import { Keypair } from '@solana/web3.js'
import { HelperUtil } from '../../utils/HelperUtil'
import { useMemo, useState } from 'react'
import { Token } from '../../components/Token'
import { useBalance } from '../../hooks/useBalance'
import Big from 'big.js'
import { IconButton, IconButtonKey } from '../../components/IconButton'

// EVM
const { address } = privateKeyToAccount(AccountUtil.privateKeyEvm)
Expand Down
3 changes: 2 additions & 1 deletion apps/builder/app/global-error.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
'use client'

import { useEffect } from 'react'

import * as Sentry from '@sentry/nextjs'
import NextError from 'next/error'
import { useEffect } from 'react'

export default function GlobalError({ error }: { error: Error & { digest?: string } }) {
useEffect(() => {
Expand Down
5 changes: 3 additions & 2 deletions apps/builder/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import type { Metadata } from 'next'
import { Toaster } from 'sonner'
import { ThemeProvider } from 'next-themes'
import { headers } from 'next/headers'
import { Toaster } from 'sonner'

import { khTeka } from '@/lib/fonts'
import { cn } from '@/lib/utils'
import { ContextProvider } from '@/providers/appkit-context-provider'
import { AppKitProvider } from '@/providers/appkit-provider'
import { headers } from 'next/headers'

import './globals.css'

const title = 'AppKit Demo'
Expand Down
4 changes: 2 additions & 2 deletions apps/builder/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use client'

import { SidebarContent } from '@/components/sidebar-content'
import { BrandingHeader } from '@/components/branding-header'
import { PreviewContent } from '@/components/preview-content'
import { SidebarContent } from '@/components/sidebar-content'
import { cn } from '@/lib/utils'
import { BrandingHeader } from '@/components/branding-header'

export default function Page() {
return (
Expand Down
3 changes: 2 additions & 1 deletion apps/builder/components/appkit-button-mobile.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
'use client'

import * as React from 'react'
import { Button } from '@/components/ui/button'

import { useAppKit } from '@reown/appkit/react'

import { Button } from '@/components/ui/button'

export function AppKitButtonMobile() {
const { open } = useAppKit()

Expand Down
1 change: 1 addition & 0 deletions apps/builder/components/branding-header.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client'

import Image from 'next/image'

import { useAppKitContext } from '@/hooks/use-appkit'
import { cn } from '@/lib/utils'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
'use client'

import { useAppKitContext } from '@/hooks/use-appkit'
import { FeatureButton } from '@/components/feature-button'

import { UniqueIdentifier } from '@dnd-kit/core'
import dynamic from 'next/dynamic'
import { ConnectMethodItemLoading } from '@/components/connect-method-item/components/loading'

import { ConnectMethod, ConstantsUtil } from '@reown/appkit-core'

import { ConnectMethodItemLoading } from '@/components/connect-method-item/components/loading'
import { FeatureButton } from '@/components/feature-button'
import { useAppKitContext } from '@/hooks/use-appkit'
import { urlStateUtils } from '@/lib/url-state'

const SortableConnectMethodList = dynamic(
Expand Down
Loading

0 comments on commit b333d3d

Please sign in to comment.