diff --git a/.changeset/afraid-crabs-pump.md b/.changeset/afraid-crabs-pump.md new file mode 100644 index 00000000..c9bc7057 --- /dev/null +++ b/.changeset/afraid-crabs-pump.md @@ -0,0 +1,5 @@ +--- +'@totejs/walletkit': patch +--- + +Fixed theme configuration naming error issue diff --git a/.changeset/cold-rockets-knock.md b/.changeset/cold-rockets-knock.md new file mode 100644 index 00000000..6ebe2b36 --- /dev/null +++ b/.changeset/cold-rockets-knock.md @@ -0,0 +1,5 @@ +--- +'@totejs/walletkit': patch +--- + +Fixed modal flickering issue in grid layout. diff --git a/.changeset/famous-drinks-behave.md b/.changeset/famous-drinks-behave.md new file mode 100644 index 00000000..d53113e8 --- /dev/null +++ b/.changeset/famous-drinks-behave.md @@ -0,0 +1,5 @@ +--- +'@totejs/walletkit': patch +--- + +Fixed TrustWallet will automatically reconnect after reloading the page. diff --git a/.changeset/happy-hounds-complain.md b/.changeset/happy-hounds-complain.md new file mode 100644 index 00000000..17ddadad --- /dev/null +++ b/.changeset/happy-hounds-complain.md @@ -0,0 +1,5 @@ +--- +'@totejs/walletkit': patch +--- + +refactor: update the `installed` field that detect whether wallet is installed to a function diff --git a/.changeset/honest-numbers-hug.md b/.changeset/honest-numbers-hug.md new file mode 100644 index 00000000..12669d36 --- /dev/null +++ b/.changeset/honest-numbers-hug.md @@ -0,0 +1,5 @@ +--- +'@totejs/walletkit': patch +--- + +Fixed multiple wallets conficts resulting in undetectable issues. diff --git a/.changeset/late-birds-compare.md b/.changeset/late-birds-compare.md new file mode 100644 index 00000000..2471f4e7 --- /dev/null +++ b/.changeset/late-birds-compare.md @@ -0,0 +1,5 @@ +--- +'@totejs/walletkit': patch +--- + +Fixed `WalletConnect` automatic connection issue in the follow scenario: connect the WalletConnect -> close browser -> reopen browser -> disconnect -> select WalletConnect, will automatically connect. diff --git a/.changeset/lovely-months-argue.md b/.changeset/lovely-months-argue.md new file mode 100644 index 00000000..8674cc05 --- /dev/null +++ b/.changeset/lovely-months-argue.md @@ -0,0 +1,5 @@ +--- +'@totejs/walletkit': patch +--- + +Fixed trustwallet losing account status after refreshing diff --git a/.changeset/modern-comics-smell.md b/.changeset/modern-comics-smell.md new file mode 100644 index 00000000..55dfc42c --- /dev/null +++ b/.changeset/modern-comics-smell.md @@ -0,0 +1,5 @@ +--- +'@totejs/walletkit': patch +--- + +Fixed conflict issue between trustwallet and metaMask. diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 00000000..06ad5de3 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,19 @@ +{ + "mode": "exit", + "tag": "alpha", + "initialVersions": { + "example-nextjs": "0.0.1", + "example-vite": "0.0.1", + "@totejs/walletkit": "1.0.7-alpha.2", + "website": "0.0.1" + }, + "changesets": [ + "famous-drinks-behave", + "happy-hounds-complain", + "honest-numbers-hug", + "late-birds-compare", + "lovely-months-argue", + "modern-comics-smell", + "pretty-flowers-rhyme" + ] +} diff --git a/.changeset/pretty-flowers-rhyme.md b/.changeset/pretty-flowers-rhyme.md new file mode 100644 index 00000000..261fa305 --- /dev/null +++ b/.changeset/pretty-flowers-rhyme.md @@ -0,0 +1,5 @@ +--- +'@totejs/walletkit': patch +--- + +Add `action` prop to WalletKitButton & WalletKitButton.Custom to support the case of adding network. diff --git a/packages/walletkit/src/components/WalletKitProvider/context.ts b/packages/walletkit/src/components/WalletKitProvider/context.ts index fa7cf50b..a61faf62 100644 --- a/packages/walletkit/src/components/WalletKitProvider/context.ts +++ b/packages/walletkit/src/components/WalletKitProvider/context.ts @@ -29,6 +29,7 @@ export interface WalletKitOptions { export interface WalletKitContextProps { options: WalletKitOptions; supportedChains: ChainProps[]; + isMobileLayout: boolean; action: Action; setAction: (action: Action) => void; diff --git a/packages/walletkit/src/components/WalletKitProvider/index.tsx b/packages/walletkit/src/components/WalletKitProvider/index.tsx index f357fec8..ba196ffb 100644 --- a/packages/walletkit/src/components/WalletKitProvider/index.tsx +++ b/packages/walletkit/src/components/WalletKitProvider/index.tsx @@ -10,6 +10,7 @@ import { RouteProvider } from '../RouteProvider'; import { ThemeVariant, ThemeMode, ThemeProvider } from '../ThemeProvider'; import { WalletKitModal } from '../WalletKitModal'; import { WalletKitOptions, WalletKitContextProps, WalletKitContext, Action } from './context'; +import { useResponsive } from '@/base/hooks/useResponsive'; export interface WalletKitProviderProps { options: WalletKitOptions; @@ -34,6 +35,7 @@ export const WalletKitProvider = (props: WalletKitProviderProps) => { const [selectedConnector, setSelectedConnector] = useState({} as Connector); const chains = useChains(); + const { isMobileLayout } = useResponsive(); const value = useMemo(() => { const finalOptions = getDefaultProviderOptions(options); @@ -44,13 +46,14 @@ export const WalletKitProvider = (props: WalletKitProviderProps) => { log: debugMode ? console.log : () => {}, options: finalOptions, supportedChains: finalChains, + isMobileLayout, action, setAction, selectedConnector, setSelectedConnector, }; return finalValue; - }, [options, chains, debugMode, action, selectedConnector]); + }, [options, chains, debugMode, isMobileLayout, action, selectedConnector]); return ( diff --git a/packages/walletkit/src/pages/Connectors/index.tsx b/packages/walletkit/src/pages/Connectors/index.tsx index 81eac6c4..b03b94e8 100644 --- a/packages/walletkit/src/pages/Connectors/index.tsx +++ b/packages/walletkit/src/pages/Connectors/index.tsx @@ -1,6 +1,5 @@ import { Box } from '@/base/components/Box'; import { ModalHeader } from '@/base/components/Modal/ModalHeader'; -import { useResponsive } from '@/base/hooks/useResponsive'; import { Navbar } from '@/components/Navbar'; import { useWalletKitContext, cx } from '@/index'; import { useConnect } from 'wagmi'; @@ -11,9 +10,8 @@ import { LIST_LAYOUT_THRESHOLD } from '@/constants/common'; export function ConnectorsPage() { const { connectors } = useConnect(); - const { options } = useWalletKitContext(); + const { options, isMobileLayout } = useWalletKitContext(); - const { isMobileLayout } = useResponsive(); const visibleConnectors = connectors.filter((c) => !!c._wallet); const useGridLayout = visibleConnectors.length > LIST_LAYOUT_THRESHOLD || isMobileLayout;