@@ -28,9 +28,6 @@ export class EncryptedCloudStorage {
28
28
}
29
29
30
30
private async encryptSync ( data : string ) {
31
- console . log ( 'this.account' , this . account ) ;
32
- console . log ( 'this.account.ensName' , this . account . ensName ) ;
33
-
34
31
const accountNonce = sha256 ( this . account . ensName ) . slice ( 0 , 26 ) ;
35
32
const encryptedPayload : EncryptedPayload = await _encrypt (
36
33
this . profileKeys ?. encryptionKeyPair ?. privateKey ! ,
@@ -70,11 +67,11 @@ export class EncryptedCloudStorage {
70
67
}
71
68
72
69
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 ) ,
78
75
} ) ;
79
76
}
80
77
}
0 commit comments