mirror of
https://github.com/Instadapp/vue-web3.git
synced 2024-07-29 21:48:25 +00:00
wip
This commit is contained in:
parent
9cbd0ccffb
commit
fab523ac65
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user