diff --git a/README.md b/README.md
index 68f0962b..9fa97fde 100644
--- a/README.md
+++ b/README.md
@@ -135,8 +135,8 @@ The settings are described in more detailed in the Sequence Kit documentation.
logoUrl: 'https://logo-dark-mode.svg',
projectName: 'my app',
showEmailInput: true,
- miniAuthOptions: ['google', 'facebook', 'twitch', 'apple'],
- authOptions: ['metamask', 'wallet-connect'],
+ socialAuthOptions: ['google', 'facebook', 'twitch', 'apple'],
+ walletAuthOptions: ['metamask', 'wallet-connect'],
};
// limits the digital assets displayed on the assets summary screen
displayedAssets: [
diff --git a/examples/react/package.json b/examples/react/package.json
index 4cfc1966..c87342e6 100644
--- a/examples/react/package.json
+++ b/examples/react/package.json
@@ -4,7 +4,7 @@
"private": true,
"homepage": "kit",
"dependencies": {
- "0xsequence": "^1.4.4",
+ "0xsequence": "^1.4.5",
"@0xsequence/design-system": "^1.0.20",
"@0xsequence/kit": "workspace:*",
"@0xsequence/kit-checkout": "workspace:*",
diff --git a/examples/react/src/components/Homepage.tsx b/examples/react/src/components/Homepage.tsx
index 4899cf19..fc6ccf2c 100644
--- a/examples/react/src/components/Homepage.tsx
+++ b/examples/react/src/components/Homepage.tsx
@@ -3,7 +3,7 @@ import qs from 'query-string'
import { useOpenConnectModal, signEthAuthProof, validateEthProof, useTheme as useKitTheme } from '@0xsequence/kit'
import { useOpenWalletModal } from '@0xsequence/kit-wallet'
import { useCheckoutModal } from '@0xsequence/kit-checkout'
-import { useDisconnect, useAccount, useWalletClient, usePublicClient } from 'wagmi'
+import { useDisconnect, useAccount, useWalletClient, usePublicClient, useSwitchNetwork, useChainId } from 'wagmi'
import {
Box,
Button,
@@ -30,6 +30,9 @@ function Homepage() {
const { triggerCheckout } = useCheckoutModal()
const { disconnect } = useDisconnect()
const { data: walletClient } = useWalletClient()
+ const { switchNetwork } = useSwitchNetwork()
+ const chainId = useChainId()
+
const publicClient = usePublicClient()
// append ?debug=true to url to enable debug mode
@@ -168,6 +171,14 @@ function Homepage() {
)
}
+ const onSwitchNetwork = () => {
+ if (chainId === 1) {
+ switchNetwork(137)
+ } else {
+ switchNetwork(1)
+ }
+ }
+
return (
{isDebugMode && (
@@ -205,6 +216,13 @@ function Homepage() {
onClick={generateEthAuthProof}
/>
)}
+ {isDebugMode && (
+
+ )}
-
+
>
)
}
@@ -135,9 +135,9 @@ export const ConnectWalletContent = (props: ConnectWalletContentProps) => {
>
)}
- {miniConnectors.length > 0 && (
+ {socialAuthConnectors.length > 0 && (
<>
- {emailConnector && showEmailInput && (
+ {((emailConnector && showEmailInput)) && (
<>
@@ -149,16 +149,17 @@ export const ConnectWalletContent = (props: ConnectWalletContentProps) => {
)}
- {miniConnectors.map(connector => {
+ {socialAuthConnectors.slice(0, 6).map(connector => {
const Logo =
theme === 'dark'
- ? connector._wallet.miniLogoDark as React.FunctionComponent || connector._wallet.logoDark as React.FunctionComponent
- : connector._wallet.miniLogoLight as React.FunctionComponent || connector._wallet.logoLight as React.FunctionComponent
+ ? connector._wallet.logoDark as React.FunctionComponent
+ : connector._wallet.logoLight as React.FunctionComponent
return (
{
justifyContent="center"
alignItems="center"
onClick={() => onConnect(connector)}
- aspectRatio='1/1'
style={{
- width: `calc(25% - ${vars.space[2]})`
+ height: '110px',
+ width: `calc(50% - ${vars.space[2]})`
}}
>
+
+ {connector._wallet.name}
+
)
@@ -185,9 +194,9 @@ export const ConnectWalletContent = (props: ConnectWalletContentProps) => {
>
)}
- {normalConnectors.length > 0 && (
+ {walletConnectors.length > 0 && (
<>
- {((emailConnector && showEmailInput) || (miniConnectors.length > 0)) && (
+ {((emailConnector && showEmailInput) || (socialAuthConnectors.length > 0)) && (
<>
@@ -199,46 +208,66 @@ export const ConnectWalletContent = (props: ConnectWalletContentProps) => {
)}
- {normalConnectors.slice(0, 6).map(connector => {
+ {walletConnectors.map(connector => {
const Logo =
theme === 'dark'
- ? connector._wallet.logoDark as React.FunctionComponent
- : connector._wallet.logoLight as React.FunctionComponent
+ ? connector._wallet.logoDark as React.FunctionComponent || connector._wallet.logoDark as React.FunctionComponent
+ : connector._wallet.logoLight as React.FunctionComponent || connector._wallet.logoLight as React.FunctionComponent
return (
- onConnect(connector)}
- style={{
- height: '110px',
- width: `calc(50% - ${vars.space[2]})`
- }}
- >
- onConnect(connector)}
+ style={{
+ height: '110px',
+ width: `calc(50% - ${vars.space[2]})`
+ }}
+ >
+
+
+
-
-
- {connector._wallet.name}
-
-
-
+ {connector._wallet.name}
+
+
+
+ // mini auth options
+ // onConnect(connector)}
+ // aspectRatio='1/1'
+ // style={{
+ // width: `calc(25% - ${vars.space[2]})`
+ // }}
+ // >
+ //
+ //
+ //
+ //
)
})}
diff --git a/packages/kit/src/components/KitProvider/index.tsx b/packages/kit/src/components/KitProvider/index.tsx
index d66d8f73..6e24e23a 100644
--- a/packages/kit/src/components/KitProvider/index.tsx
+++ b/packages/kit/src/components/KitProvider/index.tsx
@@ -53,8 +53,8 @@ export interface KitConfig {
logoUrl?: string,
projectName?: string,
showEmailInput?: boolean,
- miniAuthOptions?: string[],
- authOptions?: string[],
+ socialAuthOptions?: string[]
+ walletAuthOptions?: string[]
useMock?: boolean
},
displayedAssets?: DisplayedAsset[],
diff --git a/packages/kit/src/constants/defaultSignInOptions.ts b/packages/kit/src/constants/defaultSignInOptions.ts
index ac2d0d1e..c8b2ef9a 100644
--- a/packages/kit/src/constants/defaultSignInOptions.ts
+++ b/packages/kit/src/constants/defaultSignInOptions.ts
@@ -1,5 +1,5 @@
export const defaultSignInOptions = {
showEmailInput: true,
- miniAuthOptions: ['google', 'facebook', 'twitch', 'apple'],
- authOptions: ['metamask', 'wallet-connect']
+ walletAuthOptions: ['metamask', 'wallet-connect'],
+ socialAuthOptions: ['google', 'facebook', 'twitch', 'apple']
}
\ No newline at end of file
diff --git a/packages/wallet/package.json b/packages/wallet/package.json
index 1e1de174..1d1dc90b 100644
--- a/packages/wallet/package.json
+++ b/packages/wallet/package.json
@@ -13,11 +13,11 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
- "0xsequence": "^1.4.4",
- "@0xsequence/api": "^1.4.4",
- "@0xsequence/indexer": "^1.4.4",
- "@0xsequence/metadata": "^1.4.4",
- "@0xsequence/network": "^1.4.4",
+ "0xsequence": "^1.4.5",
+ "@0xsequence/api": "^1.4.5",
+ "@0xsequence/indexer": "^1.4.5",
+ "@0xsequence/metadata": "^1.4.5",
+ "@0xsequence/network": "^1.4.5",
"@radix-ui/react-popover": "^1.0.6",
"@tanstack/react-query": "^4.29.5",
"clsx": "^2.0.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index df6439b2..83c4490d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -138,7 +138,7 @@ importers:
examples/react:
dependencies:
0xsequence:
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5(ethers@5.7.2)
'@0xsequence/design-system':
specifier: ^1.0.20
@@ -211,19 +211,19 @@ importers:
packages/checkout:
dependencies:
0xsequence:
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5(ethers@5.7.2)
'@0xsequence/api':
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5
'@0xsequence/indexer':
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5
'@0xsequence/metadata':
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5
'@0xsequence/network':
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5(ethers@5.7.2)
'@paperxyz/react-client-sdk':
specifier: ^1.1.3
@@ -272,10 +272,10 @@ importers:
packages/connectors:
dependencies:
0xsequence:
- specifier: '>=1.4.4'
+ specifier: '>=1.4.5'
version: 1.4.5(ethers@5.7.2)
'@0xsequence/provider':
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5(ethers@5.7.2)
'@0xsequence/wagmi-connector':
specifier: ^2.1.4
@@ -306,10 +306,10 @@ importers:
packages/kit:
dependencies:
'@0xsequence/api':
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5
'@0xsequence/auth':
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5(ethers@5.7.2)
'@0xsequence/design-system':
specifier: ^1.0.20
@@ -318,20 +318,20 @@ importers:
specifier: ^0.8.1
version: 0.8.1(ethers@5.7.2)
'@0xsequence/indexer':
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5
'@0xsequence/kit-connectors':
specifier: workspace:*
version: link:../connectors
'@0xsequence/metadata':
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5
'@0xsequence/network':
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5(ethers@5.7.2)
'@0xsequence/utils':
- specifier: 1.4.4
- version: 1.4.4(ethers@5.7.2)
+ specifier: 1.4.5
+ version: 1.4.5(ethers@5.7.2)
'@0xsequence/wagmi-connector':
specifier: ^2.1.4
version: 2.1.4(0xsequence@1.4.5)(ethers@5.7.2)(typescript@5.2.2)(viem@1.10.7)(wagmi@1.3.9)
@@ -352,7 +352,7 @@ importers:
version: 18.2.0(react@18.2.0)
devDependencies:
0xsequence:
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5(ethers@5.7.2)
ethers:
specifier: 5.7.2
@@ -367,19 +367,19 @@ importers:
packages/wallet:
dependencies:
0xsequence:
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5(ethers@5.7.2)
'@0xsequence/api':
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5
'@0xsequence/indexer':
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5
'@0xsequence/metadata':
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5
'@0xsequence/network':
- specifier: ^1.4.4
+ specifier: ^1.4.5
version: 1.4.5(ethers@5.7.2)
'@radix-ui/react-popover':
specifier: ^1.0.6
@@ -670,15 +670,6 @@ packages:
- bufferutil
- utf-8-validate
- /@0xsequence/utils@1.4.4(ethers@5.7.2):
- resolution: {integrity: sha512-coDtQx8usRbTEiXHtfjiextstHpxo0+FdW7x5yIIFZuoEynus4CvL/aFv6jtHRTZdhAGRscPcyi46T4B2yrS4Q==}
- peerDependencies:
- ethers: '>=5.5 < 6'
- dependencies:
- ethers: 5.7.2
- js-base64: 3.7.5
- dev: false
-
/@0xsequence/utils@1.4.5(ethers@5.7.2):
resolution: {integrity: sha512-/ivxVJU/bLVXa4NkWeHmLk6a02ZzmsTWNGS8zSL/MvHB4xFdKoEIIZey1kMyA/aztMbEUDRBqcPqguY1cxQWaQ==}
peerDependencies: