-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into chore/add-cloud-auth-siwx-changeset
- Loading branch information
Showing
93 changed files
with
2,953 additions
and
600 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
}) | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
apps/gallery/stories/composites/wui-wallet-button.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.