From 8b1530100208f8ad907ea899e3c31b3be6dbd338 Mon Sep 17 00:00:00 2001 From: thomasRalee Date: Wed, 10 Jan 2024 19:17:01 +0800 Subject: [PATCH] chore: layer add bigNumberFormatter composable --- layer/composables/useSharedBigNumberFormatted.ts | 6 ++++-- layer/wallet/metamask.ts | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/layer/composables/useSharedBigNumberFormatted.ts b/layer/composables/useSharedBigNumberFormatted.ts index 31a47968..3f49f805 100644 --- a/layer/composables/useSharedBigNumberFormatted.ts +++ b/layer/composables/useSharedBigNumberFormatted.ts @@ -1,4 +1,4 @@ -import { computed, Ref } from 'vue' +import { computed, ComputedRef, Ref } from 'vue' import { BigNumber, BigNumberInBase, @@ -114,7 +114,9 @@ const getNumberMinimalDecimals = ( } export function useSharedBigNumberFormatter( - value: Ref, + value: + | Ref + | ComputedRef, options: { decimalPlaces?: number minimalDecimalPlaces?: number diff --git a/layer/wallet/metamask.ts b/layer/wallet/metamask.ts index 48238667..bd2ffdce 100644 --- a/layer/wallet/metamask.ts +++ b/layer/wallet/metamask.ts @@ -4,10 +4,9 @@ import { MetamaskException, UnspecifiedErrorCode } from '@injectivelabs/exceptions' -import { EthereumChainId } from '@injectivelabs/ts-types' import { walletStrategy } from './wallet-strategy' -import { ETHEREUM_CHAIN_ID, IS_MAINNET } from './../utils/constant' -import { UtilsWallets, Wallet } from '@injectivelabs/wallet-ts' +import { ETHEREUM_CHAIN_ID } from './../utils/constant' +import { UtilsWallets } from '@injectivelabs/wallet-ts' export const isMetamaskInstalled = async (): Promise => { const provider = await UtilsWallets.getMetamaskProvider()