From c670a2a541926a51abbb7441ee183057ea4a40ba Mon Sep 17 00:00:00 2001 From: himanshu Date: Mon, 9 Sep 2024 12:25:01 +0530 Subject: [PATCH] fix type names --- src/interfaces.ts | 6 +++--- src/mpcCoreKit.ts | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/interfaces.ts b/src/interfaces.ts index bd86b33..33fc607 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -18,10 +18,10 @@ import { FactorKeyTypeShareDescription, TssShareType, USER_PATH, WEB3AUTH_NETWOR export type CoreKitMode = UX_MODE_TYPE | "nodejs" | "react-native"; -export type v3TSSLibType = { keyType: string; lib: unknown }; +export type V3TSSLibType = { keyType: string; lib: unknown }; -export type NewTSSLibType = typeof TssFrostLib | typeof TssDklsLib; -export type TssLibType = NewTSSLibType | v3TSSLibType; +export type V4TSSLibType = typeof TssFrostLib | typeof TssDklsLib; +export type TssLibType = V4TSSLibType | V3TSSLibType; export interface IStorage { getItem(key: string): string | null; setItem(key: string, value: string): void; diff --git a/src/mpcCoreKit.ts b/src/mpcCoreKit.ts index 99c4677..3d88794 100644 --- a/src/mpcCoreKit.ts +++ b/src/mpcCoreKit.ts @@ -43,14 +43,14 @@ import { InitParams, JWTLoginParams, MPCKeyDetails, - NewTSSLibType, OAuthLoginParams, SessionData, SubVerifierDetailsParams, TkeyLocalStoreData, TssLibType, UserInfo, - v3TSSLibType, + V3TSSLibType, + V4TSSLibType, Web3AuthOptions, Web3AuthOptionsWithDefaults, Web3AuthState, @@ -1383,11 +1383,11 @@ export class Web3AuthMPCCoreKit implements ICoreKit { private async loadTssWasm() { if (this.wasmLib) return this.wasmLib; - if (typeof (this._tssLib as NewTSSLibType).load === "function") { + if (typeof (this._tssLib as V4TSSLibType).load === "function") { // dont wait for wasm to be loaded, we can reload it during signing if not loaded - return (this._tssLib as NewTSSLibType).load(); - } else if ((this._tssLib as v3TSSLibType).lib) { - return (this._tssLib as v3TSSLibType).lib as DKLSWasmLib | FrostWasmLib; + return (this._tssLib as V4TSSLibType).load(); + } else if ((this._tssLib as V3TSSLibType).lib) { + return (this._tssLib as V3TSSLibType).lib as DKLSWasmLib | FrostWasmLib; } } }