Skip to content

Commit ccdd121

Browse files
fix: add ts-ignore for react native native libs (#3112)
1 parent 5994685 commit ccdd121

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/thirdweb/src/wallets/in-app/native/helpers/storage/local.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@ const CONNECTED_AUTH_STRATEGY_LOCAL_STORAGE_NAME =
1313
"embedded-wallet-connected-auth-params";
1414

1515
const getItemFromAsyncStorage = async (key: string) => {
16+
// @ts-ignore - default import buils but ts doesn't like it
1617
return AsyncStorage.getItem(key);
1718
};
1819

1920
const setItemInAsyncStorage = async (key: string, value: string) => {
21+
// @ts-ignore - default import buils but ts doesn't like it
2022
await AsyncStorage.setItem(key, value);
2123
};
2224

2325
const removeItemInAsyncStorage = async (key: string) => {
26+
// @ts-ignore - default import buils but ts doesn't like it
2427
await AsyncStorage.removeItem(key);
2528
};
2629

packages/thirdweb/src/wallets/in-app/native/helpers/wallet/encryption.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export async function getEncryptionKey(
2121
salt: Uint8Array,
2222
iterationCounts: number,
2323
): Promise<string> {
24+
// @ts-ignore - default import buils but ts doesn't like it
2425
const key: ArrayBuffer = QuickCrypto.pbkdf2Sync(
2526
pwd,
2627
salt.buffer as ArrayBuffer,
@@ -50,6 +51,7 @@ export async function encryptShareWeb(
5051
// biome-ignore lint/suspicious/noExplicitAny: Can't import the types properly
5152
let encryptedValue: any;
5253
try {
54+
// @ts-ignore - default import buils but ts doesn't like it
5355
encryptedValue = await AesGcmCrypto.encrypt(share, false, keyBase64);
5456
} catch (error) {
5557
throw new Error(`Error encrypting share: ${error}`);
@@ -129,6 +131,7 @@ export async function decryptShareWeb(
129131
// biome-ignore lint/style/noNonNullAssertion: it's there
130132
const ivBufferHex = uint8ArrayToHex(base64ToUint8Array(ivBase64!));
131133

134+
// @ts-ignore - default import buils but ts doesn't like it
132135
const normalizedShare = await AesGcmCrypto.decrypt(
133136
originalBase64CipherText,
134137
key,

0 commit comments

Comments
 (0)