Skip to content

Commit

Permalink
Merge branch 'main' into chore/add-cloud-auth-siwx-changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
zoruka authored Dec 10, 2024
2 parents 8867971 + b795289 commit 2314c8c
Show file tree
Hide file tree
Showing 93 changed files with 2,953 additions and 600 deletions.
2 changes: 1 addition & 1 deletion .changeset/calm-oranges-happen.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'appkit-cli': patch
'@reown/appkit-cli': patch
'@reown/appkit-common': patch
'@reown/appkit-core': patch
'@reown/appkit-experimental': patch
Expand Down
5 changes: 0 additions & 5 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@
"ignore": [
"@examples/*",
"@apps/gallery",
"@apps/gallery-new",
"@apps/laboratory",
"@apps/laboratory-new",
"@reown/appkit-new",
"@reown/appkit-scaffold-ui-new",
"@reown/appkit-ui-new",
"@reown/appkit-adapter-bitcoin",
"@reown/appkit-adapter-polkadot"
]
Expand Down
2 changes: 1 addition & 1 deletion .changeset/eight-goats-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'@reown/appkit': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'appkit-cli': patch
'@reown/appkit-cli': patch
'@reown/appkit-common': patch
'@reown/appkit-experimental': patch
'@reown/appkit-polyfills': patch
Expand Down
21 changes: 21 additions & 0 deletions .changeset/few-chicken-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
'@reown/appkit-adapter-solana': patch
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit': patch
'@reown/appkit-common': patch
'@reown/appkit-core': patch
'@reown/appkit-adapter-ethers': patch
'@reown/appkit-adapter-ethers5': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'@reown/appkit-cli': 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
---

Fixes state and storage syncronization and persisting on multiple adapter instances
2 changes: 1 addition & 1 deletion .changeset/good-pets-listen.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'appkit-cli': patch
'@reown/appkit-cli': patch
'@reown/appkit-common': patch
'@reown/appkit-experimental': patch
'@reown/appkit-polyfills': patch
Expand Down
2 changes: 1 addition & 1 deletion .changeset/honest-insects-argue.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'@reown/appkit': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'appkit-cli': patch
'@reown/appkit-cli': patch
'@reown/appkit-common': patch
'@reown/appkit-core': patch
'@reown/appkit-experimental': patch
Expand Down
23 changes: 23 additions & 0 deletions .changeset/lemon-coats-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@reown/appkit-adapter-solana': patch
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit-wallet-button': patch
'@reown/appkit-utils': patch
'@reown/appkit-scaffold-ui': patch
'@reown/appkit': patch
'@reown/appkit-common': patch
'@reown/appkit-core': patch
'@reown/appkit-cli': patch
'@reown/appkit-ui': patch
'@apps/builder': patch
'@reown/appkit-adapter-ethers': patch
'@reown/appkit-adapter-ethers5': patch
'@reown/appkit-cdn': patch
'@reown/appkit-experimental': patch
'@reown/appkit-polyfills': patch
'@reown/appkit-siwe': patch
'@reown/appkit-siwx': patch
'@reown/appkit-wallet': patch
---

Add BitcoinAdapter.getBalance implementation based on BitcoinApi
2 changes: 1 addition & 1 deletion .changeset/old-laws-brake.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'appkit-cli': patch
'@reown/appkit-cli': patch
'@reown/appkit-common': patch
'@reown/appkit-experimental': patch
'@reown/appkit-polyfills': patch
Expand Down
2 changes: 1 addition & 1 deletion .changeset/smooth-deers-teach.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'appkit-cli': patch
'@reown/appkit-cli': patch
'@reown/appkit-common': patch
'@reown/appkit-experimental': patch
'@reown/appkit-polyfills': patch
Expand Down
2 changes: 1 addition & 1 deletion .changeset/soft-toes-promise.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'@reown/appkit-adapter-solana': patch
'@reown/appkit': patch
'@reown/appkit-cdn': patch
'appkit-cli': patch
'@reown/appkit-cli': patch
'@reown/appkit-common': patch
'@reown/appkit-core': patch
'@reown/appkit-experimental': patch
Expand Down
88 changes: 88 additions & 0 deletions .changeset/sour-berries-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
'@reown/appkit-adapter-solana': patch
'@reown/appkit-wallet-button': patch
'@reown/appkit-utils': patch
'@reown/appkit-scaffold-ui': patch
'@reown/appkit-common': patch
'@reown/appkit-core': patch
'@reown/appkit-siwx': patch
'@reown/appkit-ui': patch
'@apps/builder': patch
'@reown/appkit-adapter-ethers': patch
'@reown/appkit-adapter-ethers5': patch
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit': patch
'@reown/appkit-cdn': patch
'@reown/appkit-cli': patch
'@reown/appkit-experimental': patch
'@reown/appkit-polyfills': patch
'@reown/appkit-siwe': patch
'@reown/appkit-wallet': patch
---

Introduced wallet button component and custom hook for headless integration.

Components example:
```tsx
import '@reown/appkit-wallet-button'

export function YourApp() {
return (
<>
{/* QR Code (WalletConnect) */}
<appkit-wallet-button wallet="walletConnect" />

{/* Wallets */}
<appkit-wallet-button wallet="metamask" />
<appkit-wallet-button wallet="trust" />
<appkit-wallet-button wallet="coinbase" />

{/* Socials */}
<appkit-wallet-button wallet="google" />
<appkit-wallet-button wallet="x" />
<appkit-wallet-button wallet="discord" />
<appkit-wallet-button wallet="farcaster" />
</>
)
}
```

Hook example:
```tsx
import { useAppKitWallet } from '@reown/appkit-wallet-button/react'

export function YourApp() {
const { data, error, isPending, isSuccess, isError, connect } = useAppKitWallet({
onError: err => {
// ...
},
onSuccess: data => {
// ...
}
})

return (
<>
<button onClick={() => connect('walletConnect')}>Open QR modal</button>
<button onClick={() => connect('metamask')}>Connect to MetaMask</button>
<button onClick={() => connect('google')}>Connect to Google</button>
</>
)
}
```

Additionally a new theme variable property called `--w3m-qr-color` was added where you can configure a custom color for the QR code.

```tsx
import { createAppKit } from '@reown/appkit/react'

const modal = createAppKit({
/* Your Config */
themeVariables: {
'--w3m-qr-color': '...', // Optional
'--w3m-color-mix': '...',
'--w3m-color-mix-strength': 50
}
})

```
2 changes: 1 addition & 1 deletion .changeset/twelve-rats-grin.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'@reown/appkit': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'appkit-cli': patch
'@reown/appkit-cli': patch
'@reown/appkit-common': patch
'@reown/appkit-core': patch
'@reown/appkit-experimental': patch
Expand Down
5 changes: 5 additions & 0 deletions apps/gallery/stories/composites/wui-qr-code.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import '@reown/appkit-ui/src/composites/wui-qr-code'
import type { WuiQrCode } from '@reown/appkit-ui/src/composites/wui-qr-code'
import { html } from 'lit'
import { themeOptions, walletImageSrc } from '../../utils/PresetUtils'
import { ifDefined } from 'lit/directives/if-defined.js'

type Component = Meta<WuiQrCode>

Expand All @@ -19,6 +20,9 @@ export default {
theme: {
options: themeOptions,
control: { type: 'select' }
},
color: {
control: { type: 'color' }
}
}
} as Component
Expand All @@ -31,5 +35,6 @@ export const Default: Component = {
theme=${args.theme}
uri=${args.uri}
size=${args.size}
color=${ifDefined(args.color)}
></wui-qr-code>`
}
56 changes: 56 additions & 0 deletions apps/gallery/stories/composites/wui-wallet-button.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import type { Meta } from '@storybook/web-components'
import '@reown/appkit-ui/src/composites/wui-wallet-button'
import { html } from 'lit'
import { iconOptions, walletImageSrc } from '../../utils/PresetUtils'
import type { WuiWalletButton } from '@reown/appkit-ui/dist/types/src/composites/wui-wallet-button'

type Component = Meta<WuiWalletButton>

export default {
title: 'Composites/wui-wallet-button',
args: {
name: 'Rainbow',
imageSrc: walletImageSrc,
loading: false,
error: false,
icon: undefined,
disabled: false
},
argTypes: {
name: {
control: { type: 'text' }
},
imageSrc: {
control: { type: 'text' }
},
loading: {
control: { type: 'boolean' }
},
error: {
control: { type: 'boolean' }
},
icon: {
options: [undefined, ...iconOptions],
control: { type: 'select' }
},
disabled: {
control: { type: 'boolean' }
},
size: {
options: ['md', 'lg'],
control: { type: 'select' }
}
}
} as Component

export const Default: Component = {
render: args =>
html`<wui-wallet-button
.imageSrc=${args.imageSrc}
.icon=${args.icon}
name=${args.name}
?loading=${args.loading}
?error=${args.error}
?disabled=${args.disabled}
></wui-wallet-button>`
}
3 changes: 3 additions & 0 deletions apps/laboratory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"playwright:test:metamask": "playwright test --grep 'metamask.spec.ts'",
"playwright:test:mobile-wallet-features": "playwright test --grep 'mobile-wallet-features.spec.ts'",
"playwright:test:basic": "playwright test --grep 'basic-tests.spec.ts'",
"playwright:test:wallet-button": "playwright test --grep 'wallet-button.spec.ts'",
"playwright:test:wallet": "playwright test --grep 'wallet.spec.ts'",
"playwright:test:no-email": "playwright test --grep 'no-email.spec.ts'",
"playwright:test:no-socials": "playwright test --grep 'no-socials.spec.ts'",
Expand Down Expand Up @@ -44,6 +45,7 @@
"playwright:debug:metamask": "pnpm playwright:test:metamask --debug",
"playwright:debug:mobile-wallet-features": "pnpm playwright:test:mobile-wallet-features --debug",
"playwright:debug:basic": "pnpm playwright:test:basic --debug",
"playwright:debug:wallet-button": "pnpm playwright:test:wallet-button --debug",
"playwright:debug:wallet": "pnpm playwright:test:wallet --debug",
"playwright:debug:no-email": "pnpm playwright:test:no-email --debug",
"playwright:debug:no-socials": "pnpm playwright:test:no-socials --debug",
Expand Down Expand Up @@ -86,6 +88,7 @@
"@reown/appkit-siwe": "workspace:*",
"@reown/appkit-siwx": "workspace:*",
"@reown/appkit-wallet": "workspace:*",
"@reown/appkit-wallet-button": "workspace:*",
"@sentry/browser": "7.119.1",
"@sentry/react": "7.92.0",
"@solana/wallet-adapter-wallets": "0.19.32",
Expand Down
Loading

0 comments on commit 2314c8c

Please sign in to comment.