From e7b21cbf8a63563d291c1d1d3e723e8d21dbf18c Mon Sep 17 00:00:00 2001 From: Doug Richar Date: Thu, 5 Oct 2023 13:39:24 -0400 Subject: [PATCH] chore(types): fix minor typescript-eslint errors --- src/clients/custom/client.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/clients/custom/client.ts b/src/clients/custom/client.ts index c1665a06..a1b3ea72 100644 --- a/src/clients/custom/client.ts +++ b/src/clients/custom/client.ts @@ -4,7 +4,7 @@ import { DEFAULT_NETWORK, PROVIDER_ID } from '../../constants' import { debugLog } from '../../utils/debugLog' import { ICON } from './constants' import type _algosdk from 'algosdk' -import type { Network } from '../../types/node' +import type { AlgodClientOptions, Network } from '../../types/node' import type { InitParams } from '../../types/providers' import type { Metadata, Wallet } from '../../types/wallet' import type { CustomProvider, CustomWalletClientConstructor } from './types' @@ -40,14 +40,15 @@ class CustomWalletClient extends BaseClient { network = DEFAULT_NETWORK }: InitParams): Promise { try { - debugLog(`${PROVIDER_ID.CUSTOM.toUpperCase()} initializing...`) + debugLog(`${PROVIDER_ID.CUSTOM.toUpperCase() as string} initializing...`) if (!clientOptions) { throw new Error(`Attempt to create custom wallet with no provider specified.`) } - const algosdk = algosdkStatic || (await Algod.init(algodOptions)).algosdk - const algodClient = getAlgodClient(algosdk, algodOptions) + const algosdk: typeof _algosdk = + algosdkStatic || (await Algod.init(algodOptions as AlgodClientOptions)).algosdk + const algodClient = getAlgodClient(algosdk, algodOptions as AlgodClientOptions) try { return new CustomWalletClient({ @@ -66,7 +67,7 @@ class CustomWalletClient extends BaseClient { network }) } finally { - debugLog(`${PROVIDER_ID.CUSTOM.toUpperCase()} initialized`, '✅') + debugLog(`${PROVIDER_ID.CUSTOM.toUpperCase() as string} initialized`, '✅') } } catch (e) { console.error('Error initializing...', e)