diff --git a/package.json b/package.json index 2864423..b46dae8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@instadapp/vue-web3", - "version": "0.8.3", + "version": "0.9.0", "description": "Vue web3 composition api", "license": "MIT", "main": "index.js", diff --git a/src/index.ts b/src/index.ts index 4e8a177..91f551d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,14 @@ import { AbstractConnector } from '@web3-react/abstract-connector' import { normalizeAccount, normalizeChainId } from './normalizers' import { ConnectorEvent, ConnectorUpdate } from '@web3-react/types' -import { computed, onBeforeUnmount, Ref, ref, watch } from 'vue-demi' +import { + computed, + onBeforeUnmount, + Ref, + ref, + shallowRef, + watch, +} from 'vue-demi' export class UnsupportedChainIdError extends Error { public constructor( @@ -16,10 +23,10 @@ export class UnsupportedChainIdError extends Error { } } -const connector = ref() +const connector = shallowRef() const chainId = ref() const account = ref() -const provider = ref() +const provider = shallowRef() const error = ref() const active = computed( () => @@ -28,7 +35,7 @@ const active = computed( account.value !== undefined && !!!error.value, ) -const library = ref() +const library = shallowRef() let getLibrary: any = (provider?: any, connector?: any) => (): any => null