Skip to content

Commit

Permalink
fix cloud storage initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl committed Nov 26, 2024
1 parent d249f21 commit 108e065
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/js-sdk/src/storage/EncryptedCloudStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ export class EncryptedCloudStorage {
}

private async encryptSync(data: string) {
console.log('this.account', this.account);
console.log('this.account.ensName', this.account.ensName);

const accountNonce = sha256(this.account.ensName).slice(0, 26);
const encryptedPayload: EncryptedPayload = await _encrypt(
this.profileKeys?.encryptionKeyPair?.privateKey!,
Expand Down Expand Up @@ -70,11 +67,11 @@ export class EncryptedCloudStorage {
}

public getCloudStorage() {
return getCloudStorage(this.backendConnector, this.account.ensName, {
encryptAsync: this.encryptAsync,
decryptAsync: this.decryptAsync,
encryptSync: this.encryptSync,
decryptSync: this.decryptSync,
return getCloudStorage(this.backendConnector, this.account!.ensName, {
encryptAsync: this.encryptAsync.bind(this),
decryptAsync: this.decryptAsync.bind(this),
encryptSync: this.encryptSync.bind(this),
decryptSync: this.decryptSync.bind(this),
});
}
}

0 comments on commit 108e065

Please sign in to comment.