From 1eb28769a1257529836a509348d0c64cb7f9cc54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20Mi=C3=B1o?= Date: Thu, 7 Mar 2024 13:57:21 -0300 Subject: [PATCH] fix: types (#8) --- package.json | 2 +- src/handleProviderRequest.ts | 4 ++-- src/references/messengers.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index ae4950e..3461d83 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rainbow-me/provider", - "version": "0.0.5", + "version": "0.0.6", "main": "dist/index.js", "license": "MIT", "files": [ diff --git a/src/handleProviderRequest.ts b/src/handleProviderRequest.ts index e9bef5d..f3b6caa 100644 --- a/src/handleProviderRequest.ts +++ b/src/handleProviderRequest.ts @@ -81,7 +81,7 @@ export const handleProviderRequest = ({ const host = (isValidUrl(url) && getDappHost(url)) || ''; const activeSession = getActiveSession({ host }); - let response = null; + let response: unknown = null; switch (method) { case 'eth_chainId': { @@ -330,7 +330,7 @@ export const handleProviderRequest = ({ throw new Error('Address is required'); } - let chainId = null; + let chainId: number | null = null; if (activeSession) { chainId = activeSession?.chainId; } else { diff --git a/src/references/messengers.ts b/src/references/messengers.ts index a629e0f..c00633a 100644 --- a/src/references/messengers.ts +++ b/src/references/messengers.ts @@ -3,7 +3,7 @@ import { RPCMethod } from './ethereum'; export type RequestArguments = { id?: number; method: RPCMethod; - params?: Array | object; + params?: Array; }; export type RequestResponse =