Skip to content

Commit 108e065

Browse files
committed
fix cloud storage initialization
1 parent d249f21 commit 108e065

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

packages/js-sdk/src/storage/EncryptedCloudStorage.ts

+5-8
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ export class EncryptedCloudStorage {
2828
}
2929

3030
private async encryptSync(data: string) {
31-
console.log('this.account', this.account);
32-
console.log('this.account.ensName', this.account.ensName);
33-
3431
const accountNonce = sha256(this.account.ensName).slice(0, 26);
3532
const encryptedPayload: EncryptedPayload = await _encrypt(
3633
this.profileKeys?.encryptionKeyPair?.privateKey!,
@@ -70,11 +67,11 @@ export class EncryptedCloudStorage {
7067
}
7168

7269
public getCloudStorage() {
73-
return getCloudStorage(this.backendConnector, this.account.ensName, {
74-
encryptAsync: this.encryptAsync,
75-
decryptAsync: this.decryptAsync,
76-
encryptSync: this.encryptSync,
77-
decryptSync: this.decryptSync,
70+
return getCloudStorage(this.backendConnector, this.account!.ensName, {
71+
encryptAsync: this.encryptAsync.bind(this),
72+
decryptAsync: this.decryptAsync.bind(this),
73+
encryptSync: this.encryptSync.bind(this),
74+
decryptSync: this.decryptSync.bind(this),
7875
});
7976
}
8077
}

0 commit comments

Comments
 (0)