File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
packages/thirdweb/src/wallets/in-app/native/helpers Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,17 @@ const CONNECTED_AUTH_STRATEGY_LOCAL_STORAGE_NAME =
13
13
"embedded-wallet-connected-auth-params" ;
14
14
15
15
const getItemFromAsyncStorage = async ( key : string ) => {
16
+ // @ts -ignore - default import buils but ts doesn't like it
16
17
return AsyncStorage . getItem ( key ) ;
17
18
} ;
18
19
19
20
const setItemInAsyncStorage = async ( key : string , value : string ) => {
21
+ // @ts -ignore - default import buils but ts doesn't like it
20
22
await AsyncStorage . setItem ( key , value ) ;
21
23
} ;
22
24
23
25
const removeItemInAsyncStorage = async ( key : string ) => {
26
+ // @ts -ignore - default import buils but ts doesn't like it
24
27
await AsyncStorage . removeItem ( key ) ;
25
28
} ;
26
29
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ export async function getEncryptionKey(
21
21
salt : Uint8Array ,
22
22
iterationCounts : number ,
23
23
) : Promise < string > {
24
+ // @ts -ignore - default import buils but ts doesn't like it
24
25
const key : ArrayBuffer = QuickCrypto . pbkdf2Sync (
25
26
pwd ,
26
27
salt . buffer as ArrayBuffer ,
@@ -50,6 +51,7 @@ export async function encryptShareWeb(
50
51
// biome-ignore lint/suspicious/noExplicitAny: Can't import the types properly
51
52
let encryptedValue : any ;
52
53
try {
54
+ // @ts -ignore - default import buils but ts doesn't like it
53
55
encryptedValue = await AesGcmCrypto . encrypt ( share , false , keyBase64 ) ;
54
56
} catch ( error ) {
55
57
throw new Error ( `Error encrypting share: ${ error } ` ) ;
@@ -129,6 +131,7 @@ export async function decryptShareWeb(
129
131
// biome-ignore lint/style/noNonNullAssertion: it's there
130
132
const ivBufferHex = uint8ArrayToHex ( base64ToUint8Array ( ivBase64 ! ) ) ;
131
133
134
+ // @ts -ignore - default import buils but ts doesn't like it
132
135
const normalizedShare = await AesGcmCrypto . decrypt (
133
136
originalBase64CipherText ,
134
137
key ,
You can’t perform that action at this time.
0 commit comments