From d5026c726b5a9eee96ad7ccc9904e1c0cb588a37 Mon Sep 17 00:00:00 2001 From: LN Rocket Date: Tue, 13 May 2025 21:13:01 +0200 Subject: [PATCH] Add ts-expect-error Right after cloning the SDK and ran the code, I encountered this error: TS2322: Type 'Account' is not assignable to type '{ readonly publicKey: Uint8Array; address: string; prefixedAddress(prefix?: number | undefined): string; sign(message: string | Uint8Array<...>): Uint8Array<...>; verify(message: string | Uint8Array<...>, signature: string | Uint8Array<...>): boolean; signer: { ...; }; } | undefined'. Type 'Account' is missing the following properties from type '{ readonly publicKey: Uint8Array; address: string; prefixedAddress(prefix?: number | undefined): string; sign(message: string | Uint8Array): Uint8Array<...>; verify(message: string | Uint8Array<...>, signature: string | Uint8Array<...>): boolean; signer: { ...; }; }': publicKey, prefixedAddress, verify Going back to the history of the code, I noticed the solution is simply reverting the code of the last commit. --- src/sdk/SdkContext.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sdk/SdkContext.tsx b/src/sdk/SdkContext.tsx index 1a778d7..8c8ad59 100644 --- a/src/sdk/SdkContext.tsx +++ b/src/sdk/SdkContext.tsx @@ -47,6 +47,7 @@ export const SdkProvider = ({ children }: PropsWithChildren) => { useEffect(() => { if (selectedAccount) { + //@ts-expect-error wait update utils const sdkInstance = UniqueChain({ baseUrl, account: selectedAccount }); setSdk(sdkInstance); } else { @@ -64,4 +65,4 @@ export const SdkProvider = ({ children }: PropsWithChildren) => { ); }; -export const useSdkContext = () => useContext(SdkContext); \ No newline at end of file +export const useSdkContext = () => useContext(SdkContext);