Skip to content

Commit c269a01

Browse files
committed
minor updates
1 parent 3531b7d commit c269a01

File tree

7 files changed

+13
-9
lines changed

7 files changed

+13
-9
lines changed

lib/actions/multicall.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { multicall as masterMulticall } from '@wagmi/core'
1+
import { type MulticallConfig, multicall as masterMulticall } from '@wagmi/core'
22

3-
import type { MulticallArgs } from '../types'
3+
import type { MulticallArgs, Writeable } from '../types'
44

55
export async function multicall(params: MulticallArgs) {
6-
const contracts: any[] = []
6+
const contracts: Writeable<MulticallConfig['contracts']> = []
77

88
params.calls.forEach((item) => {
99
item.calls.forEach(([functionName, args]) => {

lib/types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export type AccountState = {
6060

6161
export type MulticallContract = {
6262
abi: any
63-
contractAddress: string
63+
contractAddress: `0x${string}`
6464
calls: [string, Array<any>?][]
6565
}
6666

@@ -174,3 +174,5 @@ export type SendTransaction = {
174174
value?: bigint
175175
confirmations?: number
176176
}
177+
178+
export type Writeable<T> = { -readonly [P in keyof T]: T[P] }

lib/wc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { GetNetworkResult, configureChains, createConfig, watchAccount, watchNetwork } from '@wagmi/core'
1+
import { type GetNetworkResult, configureChains, createConfig, watchAccount, watchNetwork } from '@wagmi/core'
22
import { EthereumClient, w3mConnectors, w3mProvider } from '@web3modal/ethereum'
33
import { reactive, toRaw, watch } from 'vue'
44
import { publicProvider } from 'wagmi/providers/public'

lib/web3Modal.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { ModalCtrlState, ThemeCtrlState } from '@web3modal/core/dist/_types/src/types/controllerTypes'
2-
import { EthereumClient } from '@web3modal/ethereum'
1+
import type { ModalCtrlState, ThemeCtrlState } from '@web3modal/core/dist/_types/src/types/controllerTypes'
2+
import { type EthereumClient } from '@web3modal/ethereum'
33
import { Web3Modal } from '@web3modal/html'
4-
import { Ref, ref } from 'vue'
4+
import { type Ref, ref } from 'vue'
55

66
import { Events } from './enums'
77
import { $emit } from './event'

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kolirt/vue-web3-auth",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"description": "Web3 authentication for Vue3 apps based on WalletConnect v2",
55
"author": "kolirt",
66
"license": "MIT",

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"strict": true,
99
"moduleResolution": "node",
1010
"allowSyntheticDefaultImports": true,
11+
"verbatimModuleSyntax": true,
1112
"esModuleInterop": true,
1213
"skipLibCheck": true,
1314
"forceConsistentCasingInFileNames": true

tsconfig.lib.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"strict": true,
99
"moduleResolution": "node",
1010
"allowSyntheticDefaultImports": true,
11+
"verbatimModuleSyntax": true,
1112
"esModuleInterop": true,
1213
"skipLibCheck": true,
1314
"forceConsistentCasingInFileNames": true

0 commit comments

Comments
 (0)