Skip to content

Commit

Permalink
add(types/nuxt.d.ts): $wagmiConfig types
Browse files Browse the repository at this point in the history
  • Loading branch information
hassnian committed Aug 8, 2024
1 parent e73ed95 commit 45830bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions composables/useWagmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ export default (
const { $wagmiConfig: config } = useNuxtApp()

const account = useAccount({
config,
config: config as any,
})

const disconnect = useNuxtApp().runWithContext(
() => useDisconnect({ config }).disconnectAsync,
() => useDisconnect({ config: config as any }).disconnectAsync,
) as Promise<DisconnectMutateAsync>

return {
Expand Down
7 changes: 7 additions & 0 deletions types/nuxt.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { Config } from '@wagmi/core'

declare module '#app' {
interface NuxtApp {
$wagmiConfig: Config
}
}

0 comments on commit 45830bc

Please sign in to comment.