wevm / wagmi

Reactive primitives for Ethereum apps
https://wagmi.sh
MIT License
5.94k stars 1.03k forks source link

Create config having ts error #4331

Closed HarshEvident closed 1 week ago

HarshEvident commented 1 week ago

Check existing issues

Describe the bug

Expected 0 arguments, but got 1. 56 | }); 57 |

58 | export const config = createConfig({ | ^ 59 | chains: [polygonAmoy1], | ^^^^^^^^^^^^^^^^^^^^^^^^^ 60 | connectors:[injected()], | ^^^^^^^^^^^^^^^^^^^^^^^^^ 61 | transports: { | ^^^^^^^^^^^^^^^^^^^^^^^^^ 62 | polygonAmoy1.id: http( | ^^^^^^^^^^^^^^^^^^^^^^^^^ 63 | 'https://polygon-amoy.infura.io/v3/660062148d604a82b5f6b2b88d6e199d' | ^^^^^^^^^^^^^^^^^^^^^^^^^ 64 | ), | ^^^^^^^^^^^^^^^^^^^^^^^^^ 65 | }, | ^^^^^^^^^^^^^^^^^^^^^^^^^ 66 | ssr: false, | ^^^^^^^^^^^^^^^^^^^^^^^^^ 67 | }); | ^^ 68 | 69 | declare module '@wagmi/core' { 70 | interface Register {

Link to Minimal Reproducible Example

No response

Steps To Reproduce

{ "name": "evident-account", "version": "1.2.0", "description": "EVIDENT is a platform for pioneering asset managers to grow their business by more effectively engaging and collaborating with co-investors.", "productName": "EVIDENT", "author": "EVIDENT Limited", "private": true, "scripts": { "lint": "eslint --cache --ext .js,.ts,.vue ./src/", "dev": "quasar dev", "build": "quasar build -m spa", "prettier": "prettier --write \"src/*/.{js,ts,vue}\"", "typecheck": "vue-tsc --noEmit --skipLibCheck", "changelog": "npx auto-changelog --output CHANGELOG.md --template keepachangelog --commit-limit 0 -u --sort-commits date-desc --hide-credit" }, "husky": { "hooks": { "pre-commit": "lint-staged" } }, "lint-staged": { "*.{js,ts,jsx,tsx,vue}": [ "eslint --cache", "prettier --write" ] }, "dependencies": { "@quasar/extras": "^1.16.4", "@reown/appkit": "^1.0.4", "@reown/appkit-adapter-wagmi": "^1.0.4", "@sumsub/websdk": "^1.3.0", "@tinymce/tinymce-vue": "^4.0.5", "@vee-validate/rules": "^4.5.7", "@vueuse/components": "8.4.2", "@vueuse/core": "9.4.0", "@wagmi/connectors": "5.1.13", "@wagmi/core": "2.13.4", "axios": "0.21.1", "compressorjs": "^1.1.1", "core-js": "^3.26.0", "country-data": "^0.0.31", "dayjs": "^1.11.3", "dotenv": "^16.3.1", "lodash-es": "^4.17.21", "pusher-js": "^7.0.6", "qrious": "^4.0.2", "quasar": "^2.12.0", "sanitize-html": "^2.6.1", "v-money3": "^3.24.0", "vee-validate": "^4.5.7", "viem": "^2.21.15", "vue": "^3.2.37", "vue-country-flag-next": "^2.3.2", "vue-qrious": "^2.0.0", "vue-router": "^4.1.6", "wagmi": "2.12.14" }, "devDependencies": { "@babel/eslint-parser": "^7.18.2", "@quasar/app-webpack": "^3.0.0", "@types/country-data": "^0.0.2", "@types/lodash-es": "^4.17.6", "@types/node": "18.11.9", "@types/sanitize-html": "^2.9.0", "@typescript-eslint/eslint-plugin": "^5.11.0", "@typescript-eslint/parser": "^5.40.1", "eslint": "^8.27.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-vue": "^8.4.1", "husky": "8", "lint-staged": "^13.0.3", "prettier": "^2.7.1", "typescript": "5.0.5", "vue-tsc": "1.0.9" }, "overrides": { "@typescript-eslint/typescript-estree": "^5.57.1", "fork-ts-checker-webpack-plugin": "^6.5.3", "typescript": "^5.0.5" }, "browserslist": [ "last 10 Chrome versions", "last 10 Firefox versions", "last 4 Edge versions", "last 7 Safari versions", "last 8 Android versions", "last 8 ChromeAndroid versions", "last 8 FirefoxAndroid versions", "last 10 iOS versions", "last 5 Opera versions" ] }

What Wagmi package(s) are you using?

@wagmi/core

Wagmi Package(s) Version(s)

"wagmi": "2.12.14"

Viem Version

"viem": "^2.21.15",

TypeScript Version

5.0.4

Anything else?

{ "extends": "@quasar/app-webpack/tsconfig-preset", "compilerOptions": { "strict": true, "baseUrl": ".", "paths": { "shared/": ["src/Shared/"], "auth/": ["src/auth/"], "user/": ["src/User/"], "assets/": ["src/Assets/"], "trade/": ["src/Trade/"], "portfolio/": ["src/Portfolio/"], "payments/": ["src/Payments/"] }, "target": "ESNext", "useUnknownInCatchVariables": false, "jsx": "preserve", } }

import { boot } from 'quasar/wrappers'; import { polygonAmoy as polygonAmoy1 } from 'viem/chains'; import { createWalletClient, custom } from 'viem'; import { WagmiAdapter } from '@reown/appkit-adapter-wagmi'; import { CaipNetwork, createAppKit, useAppKit } from '@reown/appkit/vue'; import { http, createConfig, injected } from '@wagmi/core';

const projectId = '84ab5130b308e4fb678g3221ce130';

const metadata = { name: 'EVIDENT', description: 'Invest in Alternatives Empower with Impact', url: 'https://www.evident.capital/', icons: ['https://app.investor.evident.capital/png/evident-logo-mint.png'], };

const polygonAmoy: CaipNetwork = { id: polygonAmoy1.id, name: 'Polygon Amoy', caipNetworkId: 'eip155:80002', chainNamespace: 'eip155', nativeCurrency: polygonAmoy1.nativeCurrency, rpcUrls: { default: polygonAmoy1.rpcUrls.default, }, blockExplorers: { default: polygonAmoy1.blockExplorers.default, }, };

export const networks = [polygonAmoy];

export default boot(() => { const wagmiAdapter = new WagmiAdapter({ ssr: false, projectId, networks, });

createAppKit({ adapters: [wagmiAdapter], networks: [polygonAmoy], metadata, projectId, features: { analytics: true, // Optional - defaults to your Cloud configuration }, allowUnsupportedChain: true, }); }); export const walletClient = createWalletClient({ chain: polygonAmoy1, transport: custom(window.ethereum!), });

export const config = createConfig({ chains: [polygonAmoy1], connectors: [injected()], transports: {

  'https://polygon-amoy.infura.io/v3/660062148d604a82b5f6b2b88d6e199d'
),

}, ssr: false, });

declare module '@wagmi/core' { interface Register { config: typeof config; } }

export const modal = useAppKit();

github-actions[bot] commented 1 week ago

Hello @HarshEvident.

Please provide a minimal reproduction using StackBlitz, TypeScript Playground (for type issues), or a separate minimal GitHub repository.

Minimal reproductions are required as they save us a lot of time reproducing your config/environment and issue, and allow us to help you faster.

Once a minimal reproduction is added, a team member will confirm it works, then re-open the issue.