diff --git a/.changeset/moody-eels-compete.md b/.changeset/moody-eels-compete.md new file mode 100644 index 00000000..f5a44c9a --- /dev/null +++ b/.changeset/moody-eels-compete.md @@ -0,0 +1,5 @@ +--- +'@totejs/walletkit': patch +--- + +Add chains type declaration for dev example diff --git a/.changeset/pretty-zoos-type.md b/.changeset/pretty-zoos-type.md new file mode 100644 index 00000000..590b5402 --- /dev/null +++ b/.changeset/pretty-zoos-type.md @@ -0,0 +1,5 @@ +--- +'@totejs/walletkit': patch +--- + +Fixed typescript declaration files export path error, remove `dev` in tsconfig.json includes field diff --git a/packages/walletkit/dev/App.tsx b/packages/walletkit/dev/App.tsx index 2dd72ed6..df07e60e 100644 --- a/packages/walletkit/dev/App.tsx +++ b/packages/walletkit/dev/App.tsx @@ -8,7 +8,7 @@ import { WalletKitProvider, getDefaultConfig, useModal, -} from '@/index'; +} from '../src/index'; import { useState } from 'react'; import { @@ -20,7 +20,8 @@ import { tokenPocket, trustWallet, walletConnect, -} from '@/wallets'; +} from '../src/wallets'; +import React from 'react'; const config = createConfig( getDefaultConfig({ diff --git a/packages/walletkit/src/wallets/utils.ts b/packages/walletkit/src/wallets/utils.ts index cdf87a36..368b1780 100644 --- a/packages/walletkit/src/wallets/utils.ts +++ b/packages/walletkit/src/wallets/utils.ts @@ -7,8 +7,8 @@ export function getInjectedProvider(flag: keyof InjectedProviderFlags): WindowPr return providers ? providers.find((provider: WindowProvider) => provider[flag]) : window.ethereum[flag] - ? window.ethereum - : undefined; + ? window.ethereum + : undefined; } export function hasInjectedProvider(flag: keyof InjectedProviderFlags): boolean { diff --git a/packages/walletkit/tsconfig.json b/packages/walletkit/tsconfig.json index 51251c57..3350e9cd 100644 --- a/packages/walletkit/tsconfig.json +++ b/packages/walletkit/tsconfig.json @@ -25,6 +25,6 @@ "@/*": ["src/*"] } }, - "include": ["src", "dev"], + "include": ["src"], "references": [{ "path": "./tsconfig.node.json" }] } diff --git a/website/src/components/WalletKit/index.tsx b/website/src/components/WalletKit/index.tsx index 5d7ba403..f76e8013 100644 --- a/website/src/components/WalletKit/index.tsx +++ b/website/src/components/WalletKit/index.tsx @@ -8,12 +8,12 @@ import { SwitchNetworkModal, } from '@totejs/walletkit'; import { - binanceWeb3Wallet, - coinbaseWallet, - mathWallet, + // binanceWeb3Wallet, + // coinbaseWallet, + // mathWallet, metaMask, - okxWallet, - tokenPocket, + // okxWallet, + // tokenPocket, trustWallet, walletConnect, } from '@totejs/walletkit/wallets';