mirror of
https://github.com/Instadapp/vue-web3.git
synced 2024-07-29 21:48:25 +00:00
Update index.ts
This commit is contained in:
parent
d4322fee4b
commit
a80111bf30
|
@ -45,9 +45,11 @@ export const setWeb3LibraryCallback = (
|
||||||
getLibrary = cb
|
getLibrary = cb
|
||||||
}
|
}
|
||||||
|
|
||||||
export type VueWeb3Library = any
|
export interface IVueWeb3Library {
|
||||||
|
[key: string]: any
|
||||||
|
}
|
||||||
|
|
||||||
export const useWeb3 = <VueWeb3Library>() => {
|
export const useWeb3 = <TVueWeb3Library extends IVueWeb3Library>() => {
|
||||||
const onErrorCb = ref<(error: Error) => void>()
|
const onErrorCb = ref<(error: Error) => void>()
|
||||||
|
|
||||||
const activate = async (
|
const activate = async (
|
||||||
|
@ -191,7 +193,7 @@ export const useWeb3 = <VueWeb3Library>() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
library: library as Ref<VueWeb3Library>,
|
library: library as Ref<TVueWeb3Library>,
|
||||||
active,
|
active,
|
||||||
activate,
|
activate,
|
||||||
deactivate,
|
deactivate,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user