This commit is contained in:
Georges KABBOUCHI 2021-08-29 14:07:06 +03:00
parent 9cbd0ccffb
commit fab523ac65
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@kabbouchi/vue-web3",
"version": "0.2.14",
"version": "0.2.15",
"description": "Vue web3 composition api",
"license": "MIT",
"main": "dist/cjs/index.js",

View File

@ -1,7 +1,7 @@
import { AbstractConnector } from '@web3-react/abstract-connector'
import { normalizeAccount, normalizeChainId } from './normalizers'
import { ConnectorEvent, ConnectorUpdate } from '@web3-react/types'
import { computed, onBeforeUnmount, ref, watch } from 'vue-demi'
import { computed, onBeforeUnmount, Ref, ref, watch } from 'vue-demi'
export class UnsupportedChainIdError extends Error {
public constructor(
@ -36,7 +36,7 @@ export const setWeb3LibraryCallback = (
getLibrary = cb
}
export const useWeb3 = () => {
export const useWeb3 = <TLibrary>() => {
const onErrorCb = ref<(error: Error) => void>()
const activate = async (
@ -180,7 +180,7 @@ export const useWeb3 = () => {
})
return {
library,
library: library as Ref<TLibrary>,
active,
activate,
deactivate,