diff --git a/.vscode/settings.json b/.vscode/settings.json index 8b555aebe4..24cb1b2118 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,9 +10,7 @@ "files.exclude": { "**/.DS_Store": true, "**/.git": true, - "**/node_modules": true, "**/out": true, - "**/dist": true, "**/.turbo": true, "**/playwright-report": true, "**/coverage": true diff --git a/package-lock.json b/package-lock.json index adbedb106a..c44d1ce3a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10667,6 +10667,7 @@ "node_modules/@vue/compiler-core": { "version": "3.4.19", "license": "MIT", + "peer": true, "dependencies": { "@babel/parser": "^7.23.9", "@vue/shared": "3.4.19", @@ -10678,6 +10679,7 @@ "node_modules/@vue/compiler-dom": { "version": "3.4.19", "license": "MIT", + "peer": true, "dependencies": { "@vue/compiler-core": "3.4.19", "@vue/shared": "3.4.19" @@ -10686,6 +10688,7 @@ "node_modules/@vue/compiler-sfc": { "version": "3.4.19", "license": "MIT", + "peer": true, "dependencies": { "@babel/parser": "^7.23.9", "@vue/compiler-core": "3.4.19", @@ -10715,6 +10718,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", @@ -10727,6 +10731,7 @@ "node_modules/@vue/compiler-ssr": { "version": "3.4.19", "license": "MIT", + "peer": true, "dependencies": { "@vue/compiler-dom": "3.4.19", "@vue/shared": "3.4.19" @@ -10735,6 +10740,7 @@ "node_modules/@vue/reactivity": { "version": "3.4.19", "license": "MIT", + "peer": true, "dependencies": { "@vue/shared": "3.4.19" } @@ -10742,6 +10748,7 @@ "node_modules/@vue/runtime-core": { "version": "3.4.19", "license": "MIT", + "peer": true, "dependencies": { "@vue/reactivity": "3.4.19", "@vue/shared": "3.4.19" @@ -10750,6 +10757,7 @@ "node_modules/@vue/runtime-dom": { "version": "3.4.19", "license": "MIT", + "peer": true, "dependencies": { "@vue/runtime-core": "3.4.19", "@vue/shared": "3.4.19", @@ -10759,6 +10767,7 @@ "node_modules/@vue/server-renderer": { "version": "3.4.19", "license": "MIT", + "peer": true, "dependencies": { "@vue/compiler-ssr": "3.4.19", "@vue/shared": "3.4.19" @@ -10769,7 +10778,8 @@ }, "node_modules/@vue/shared": { "version": "3.4.19", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@wagmi/connectors": { "version": "4.1.4", @@ -23497,6 +23507,7 @@ "node_modules/vue": { "version": "3.4.19", "license": "MIT", + "peer": true, "dependencies": { "@vue/compiler-dom": "3.4.19", "@vue/compiler-sfc": "3.4.19", @@ -24459,11 +24470,11 @@ "lit": "3.1.0" }, "devDependencies": { - "@web3modal/siwe": "4.0.7", - "@web3modal/wallet": "4.0.7" + "@web3modal/siwe": "4.0.8", + "@web3modal/wallet": "4.0.8" }, "optionalDependencies": { - "@web3modal/siwe": "4.0.7" + "@web3modal/siwe": "4.0.8" }, "peerDependencies": { "@web3modal/siwe": ">=4" @@ -24491,8 +24502,8 @@ "version": "4.0.8", "license": "Apache-2.0", "dependencies": { + "@web3modal/core": "4.0.8", "@web3modal/polyfills": "4.0.8", - "@web3modal/scaffold": "4.0.8", "valtio": "1.11.2" } }, @@ -24507,104 +24518,11 @@ "vue": ">=3" } }, - "packages/scaffold/node_modules/@web3modal/polyfills": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@web3modal/polyfills/-/polyfills-4.0.7.tgz", - "integrity": "sha512-eSZL/md0ACbdoUOlvlUlhWnI2dmnYU6SkhOp450LOO6f3LN+mx7dk9kAwfu7u8Vh0coOoDqUG/WvtCBOoiabnw==", - "dev": true, - "dependencies": { - "buffer": "6.0.3" - } - }, - "packages/scaffold/node_modules/@web3modal/scaffold": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@web3modal/scaffold/-/scaffold-4.0.7.tgz", - "integrity": "sha512-/58LpFO+78BIrIthEvwM4hAJTpJdXnxWR8BK2fphkrFE9rQ5L8O4NnJ9PmaAm5i8UT1s1ip3JnCWi1vQ7jze2Q==", - "dev": true, - "dependencies": { - "@web3modal/common": "4.0.7", - "@web3modal/core": "4.0.7", - "@web3modal/ui": "4.0.7", - "lit": "3.1.0" - } - }, - "packages/scaffold/node_modules/@web3modal/scaffold-utils": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@web3modal/scaffold-utils/-/scaffold-utils-4.0.7.tgz", - "integrity": "sha512-uo00Qc+cpDT5wyzZwypXmrzgRc4WATvXY89ozTknYY9tNAiDsBPO8qVLOHW1R/jOYuzvgi+yd1g8/RPWxU60gw==", - "dev": true, - "dependencies": { - "@web3modal/polyfills": "4.0.7", - "@web3modal/scaffold": "4.0.7", - "valtio": "1.11.2" - } - }, - "packages/scaffold/node_modules/@web3modal/scaffold/node_modules/@web3modal/common": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@web3modal/common/-/common-4.0.7.tgz", - "integrity": "sha512-LvHt/zlsdpN43dct9LQPGHkYBggQX7GAUePTKT4a5fDIGBReYcLiBu7qnjJ3NnGiE4gQ+fS/dUoqeST32nTwsw==", - "dev": true, - "dependencies": { - "dayjs": "1.11.10" - } - }, - "packages/scaffold/node_modules/@web3modal/scaffold/node_modules/@web3modal/core": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@web3modal/core/-/core-4.0.7.tgz", - "integrity": "sha512-jz6b8qOYrfq6ek39V1xFUHKW8uWy6Gtp3TkbWXmnvZLUxPnQG23woq85TmgjgjyNFLGIX9oeBFsBuE5++28URA==", - "dev": true, - "dependencies": { - "@web3modal/common": "4.0.7", - "@web3modal/wallet": "4.0.7", - "valtio": "1.11.2" - } - }, - "packages/scaffold/node_modules/@web3modal/scaffold/node_modules/@web3modal/ui": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@web3modal/ui/-/ui-4.0.7.tgz", - "integrity": "sha512-cz2BDouw8ynDwXZuNwxXKZZWq7vIiRUsOZ2hxZmxWBJWY5l6yass+DrgLlfOvMXL8q8n2bNJgrhDvR1kdAe08w==", - "dev": true, - "dependencies": { - "lit": "3.1.0", - "qrcode": "1.5.3" - } - }, - "packages/scaffold/node_modules/@web3modal/siwe": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@web3modal/siwe/-/siwe-4.0.7.tgz", - "integrity": "sha512-xT2jgXDOVAoCll1EOuPBdJiX+5aJIYS+lDsUd4S3kZ+/zJ5emC7+jCd6VgFa4Vg4ROnGMipHyw1zgJazQEWU3A==", - "dev": true, - "dependencies": { - "@web3modal/core": "4.0.7", - "@web3modal/scaffold-utils": "4.0.7" - }, - "optionalDependencies": { - "react": ">=17", - "react-dom": ">=17", - "vue": ">=3" - }, - "peerDependencies": { - "react": ">=17", - "react-dom": ">=17", - "vue": ">=3" - }, - "peerDependenciesMeta": { - "react": { - "optional": true - }, - "react-dom": { - "optional": true - }, - "vue": { - "optional": true - } - } - }, "packages/scaffold/node_modules/@web3modal/siwe/node_modules/@web3modal/common": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/@web3modal/common/-/common-4.0.7.tgz", "integrity": "sha512-LvHt/zlsdpN43dct9LQPGHkYBggQX7GAUePTKT4a5fDIGBReYcLiBu7qnjJ3NnGiE4gQ+fS/dUoqeST32nTwsw==", - "dev": true, + "extraneous": true, "dependencies": { "dayjs": "1.11.10" } @@ -24613,22 +24531,13 @@ "version": "4.0.7", "resolved": "https://registry.npmjs.org/@web3modal/core/-/core-4.0.7.tgz", "integrity": "sha512-jz6b8qOYrfq6ek39V1xFUHKW8uWy6Gtp3TkbWXmnvZLUxPnQG23woq85TmgjgjyNFLGIX9oeBFsBuE5++28URA==", - "dev": true, + "extraneous": true, "dependencies": { "@web3modal/common": "4.0.7", "@web3modal/wallet": "4.0.7", "valtio": "1.11.2" } }, - "packages/scaffold/node_modules/@web3modal/wallet": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@web3modal/wallet/-/wallet-4.0.7.tgz", - "integrity": "sha512-LjLpvtSDoEMA6UvpFMVr4z7NM86bWv5EckK9l41AJv5F8PmxWXhL+fpsN4DK4CGtGcmYazcAXPg4M7SDLetxBg==", - "dev": true, - "dependencies": { - "zod": "3.22.4" - } - }, "packages/scaffold/node_modules/lit": { "version": "3.1.0", "license": "BSD-3-Clause", diff --git a/packages/scaffold-utils/package.json b/packages/scaffold-utils/package.json index b1052e30cd..fd85b370c7 100644 --- a/packages/scaffold-utils/package.json +++ b/packages/scaffold-utils/package.json @@ -35,8 +35,8 @@ "lint": "eslint . --ext .js,.jsx,.ts,.tsx" }, "dependencies": { + "@web3modal/core": "4.0.8", "@web3modal/polyfills": "4.0.8", - "@web3modal/scaffold": "4.0.8", "valtio": "1.11.2" }, "keywords": [ diff --git a/packages/scaffold/package.json b/packages/scaffold/package.json index 896d6eb4b0..c2ec2976b6 100644 --- a/packages/scaffold/package.json +++ b/packages/scaffold/package.json @@ -25,8 +25,8 @@ "@web3modal/siwe": ">=4" }, "devDependencies": { - "@web3modal/wallet": "4.0.7", - "@web3modal/siwe": "4.0.7" + "@web3modal/wallet": "4.0.8", + "@web3modal/siwe": "4.0.8" }, "peerDependenciesMeta": { "@web3modal/siwe": { @@ -34,7 +34,7 @@ } }, "optionalDependencies": { - "@web3modal/siwe": "4.0.7" + "@web3modal/siwe": "4.0.8" }, "keywords": [ "web3", diff --git a/packages/scaffold/src/client.ts b/packages/scaffold/src/client.ts index 6a9f8916d3..2a20867ca0 100644 --- a/packages/scaffold/src/client.ts +++ b/packages/scaffold/src/client.ts @@ -209,7 +209,7 @@ export class Web3ModalScaffold { if (options.siweControllerClient) { const { SIWEController } = await import('@web3modal/siwe') - OptionsController.setfix / siwe(true) + OptionsController.setIsSiweEnabled(true) SIWEController.setSIWEClient(options.siweControllerClient) } diff --git a/packages/scaffold/src/modal/w3m-modal/index.ts b/packages/scaffold/src/modal/w3m-modal/index.ts index 1e7a9a4f42..466078c229 100644 --- a/packages/scaffold/src/modal/w3m-modal/index.ts +++ b/packages/scaffold/src/modal/w3m-modal/index.ts @@ -32,7 +32,7 @@ export class W3mModal extends LitElement { @state() private caipAddress = AccountController.state.caipAddress - @state() private isSiweEnabled = OptionsController.state.fix / siwe + @state() private isSiweEnabled = OptionsController.state.isSiweEnabled public constructor() { super() diff --git a/packages/scaffold/src/partials/w3m-header/index.ts b/packages/scaffold/src/partials/w3m-header/index.ts index 6ec74843ab..948f9464b6 100644 --- a/packages/scaffold/src/partials/w3m-header/index.ts +++ b/packages/scaffold/src/partials/w3m-header/index.ts @@ -107,7 +107,7 @@ export class W3mHeader extends LitElement { } private async onClose() { - if (OptionsController.state.fix / siwe) { + if (OptionsController.state.isSiweEnabled) { const { SIWEController } = await import('@web3modal/siwe') if (SIWEController.state.status !== 'success') { await ConnectionController.disconnect() diff --git a/packages/scaffold/src/views/w3m-connecting-external-view/index.ts b/packages/scaffold/src/views/w3m-connecting-external-view/index.ts index 013d2bbe0d..c7eeb1019d 100644 --- a/packages/scaffold/src/views/w3m-connecting-external-view/index.ts +++ b/packages/scaffold/src/views/w3m-connecting-external-view/index.ts @@ -45,7 +45,7 @@ export class W3mConnectingExternalView extends W3mConnectingWidget { } await ConnectionController.connectExternal(this.connector) - if (OptionsController.state.fix / siwe) { + if (OptionsController.state.isSiweEnabled) { RouterController.push('ConnectingSiwe') } else { ModalController.close() diff --git a/packages/scaffold/src/views/w3m-connecting-wc-view/index.ts b/packages/scaffold/src/views/w3m-connecting-wc-view/index.ts index e5baa4fec7..1dd8a8e31a 100644 --- a/packages/scaffold/src/views/w3m-connecting-wc-view/index.ts +++ b/packages/scaffold/src/views/w3m-connecting-wc-view/index.ts @@ -76,7 +76,7 @@ export class W3mConnectingWcView extends LitElement { await ConnectionController.state.wcPromise this.finalizeConnection() - if (OptionsController.state.fix / siwe) { + if (OptionsController.state.isSiweEnabled) { RouterController.push('ConnectingSiwe') } else { ModalController.close() diff --git a/packages/scaffold/src/views/w3m-network-switch-view/index.ts b/packages/scaffold/src/views/w3m-network-switch-view/index.ts index 5443fd260d..7ba1639d96 100644 --- a/packages/scaffold/src/views/w3m-network-switch-view/index.ts +++ b/packages/scaffold/src/views/w3m-network-switch-view/index.ts @@ -111,7 +111,7 @@ export class W3mNetworkSwitchView extends LitElement { this.error = false if (this.network) { await NetworkController.switchActiveNetwork(this.network) - if (!OptionsController.state.fix / siwe) { + if (!OptionsController.state.isSiweEnabled) { RouterUtil.navigateAfterNetworkSwitch() } } diff --git a/packages/wagmi/exports/react/index.ts b/packages/wagmi/exports/react/index.ts index 7843b831b0..453f9b55f9 100644 --- a/packages/wagmi/exports/react/index.ts +++ b/packages/wagmi/exports/react/index.ts @@ -11,7 +11,6 @@ let modal: Web3Modal | undefined = undefined export function createWeb3Modal(options: Web3ModalOptions) { if (!modal) { - // @ts-expect-error Types Overlap modal = new Web3Modal({ ...options, _sdkVersion: `react-wagmi-${ConstantsUtil.VERSION}` }) getWeb3Modal(modal) } diff --git a/packages/wagmi/src/client.ts b/packages/wagmi/src/client.ts index bfc7057ba8..3bb2411314 100644 --- a/packages/wagmi/src/client.ts +++ b/packages/wagmi/src/client.ts @@ -11,8 +11,8 @@ import { watchAccount, watchConnectors } from '@wagmi/core' -import { mainnet } from '@wagmi/core/chains' -import type { Chain } from '@wagmi/core/chains' +import { mainnet } from 'viem/chains' +import type { Chain } from 'viem/chains' import type { GetAccountReturnType } from '@wagmi/core' import type { CaipAddress, diff --git a/packages/wagmi/src/connectors/EmailConnector.ts b/packages/wagmi/src/connectors/EmailConnector.ts index 68ebe29b09..4d6e2cc175 100644 --- a/packages/wagmi/src/connectors/EmailConnector.ts +++ b/packages/wagmi/src/connectors/EmailConnector.ts @@ -1,5 +1,5 @@ import { createConnector, normalizeChainId } from '@wagmi/core' -import type { Chain } from '@wagmi/core/chains' +import type { Chain } from 'viem/chains' import { W3mFrameProvider } from '@web3modal/wallet' import { SwitchChainError, getAddress } from 'viem' import type { Address } from 'viem' diff --git a/packages/wagmi/src/utils/defaultWagmiReactConfig.ts b/packages/wagmi/src/utils/defaultWagmiReactConfig.ts index a6e39f33ac..6e76ea9bc3 100644 --- a/packages/wagmi/src/utils/defaultWagmiReactConfig.ts +++ b/packages/wagmi/src/utils/defaultWagmiReactConfig.ts @@ -62,7 +62,6 @@ export function defaultWagmiConfig({ // Dissabled by default if (enableEmail === true) { - // @ts-expect-error Chain types overlap with core connectors.push(emailConnector({ chains: [...chains], options: { projectId } })) } diff --git a/packages/wagmi/src/utils/helpers.ts b/packages/wagmi/src/utils/helpers.ts index 55f1b0e687..a20c555650 100644 --- a/packages/wagmi/src/utils/helpers.ts +++ b/packages/wagmi/src/utils/helpers.ts @@ -4,7 +4,7 @@ import { EthereumProvider } from '@walletconnect/ethereum-provider' import { http } from 'viem' import type { CaipNetwork, CaipNetworkId } from '@web3modal/scaffold' -import type { Chain } from '@wagmi/core/chains' +import type { Chain } from 'viem/chains' import type { Connector } from '@wagmi/core' export function getCaipDefaultChain(chain?: Chain) { diff --git a/packages/wagmi/src/utils/provider.ts b/packages/wagmi/src/utils/provider.ts index 8041b23d0c..5b7ad063ca 100644 --- a/packages/wagmi/src/utils/provider.ts +++ b/packages/wagmi/src/utils/provider.ts @@ -1,5 +1,5 @@ import { http } from '@wagmi/core' -import type { Chain } from '@wagmi/core/chains' +import type { Chain } from 'viem/chains' import { CoreHelperUtil } from '@web3modal/scaffold' import { ConstantsUtil, PresetsUtil } from '@web3modal/scaffold-utils' diff --git a/turbo.json b/turbo.json index 78b9d086d2..6cc372f569 100644 --- a/turbo.json +++ b/turbo.json @@ -37,12 +37,12 @@ }, "build:scaffold-react": { "outputs": ["dist/**"], - "dependsOn": ["^build:scaffold-utils", "^build:siwe"], + "dependsOn": ["^build:scaffold-utils", "^build:scaffold", "^build:siwe"], "cache": false }, "build:scaffold-vue": { "outputs": ["dist/**"], - "dependsOn": ["^build:scaffold-utils", "^build:siwe"], + "dependsOn": ["^build:scaffold-utils", "^build:scaffold", "^build:siwe"], "cache": false }, "build:siwe": {