Skip to content

Commit 79ad42b

Browse files
committed
resolved merge conflict
2 parents f17129e + e369b2a commit 79ad42b

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

sdk/tests/wasm.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,8 @@ describe('WASM Objects', () => {
362362
expect(isOwner).equal(true);
363363
})
364364

365-
it ('cannot be decrypted with an invalid record view key', () => {
366-
const foreignViewKey = ViewKey.from_string(foreignViewKeyString);
367-
const badRecordViewKey = ciphertext.recordViewKey(foreignViewKey);
368-
365+
it('cannot be decrypted with an invalid record view key', () => {
366+
const badRecordViewKey = ciphertext.recordViewKey(ViewKey.from_string(foreignViewKeyString));
369367
// Ensure the record ciphertext cannot be decrypted with an invalid record view key
370368
expect(() => ciphertext.decryptWithRecordViewKey(badRecordViewKey)).throw();
371369
})
@@ -458,7 +456,7 @@ owner: aleo1j7qxyunfldj2lp8hsvy7mw5k8zaqgjfyr72x2gh3x4ewgae8v5gscf5jh3.private,
458456
const recordViewKey = Field.fromString(recordViewKeyString);
459457

460458
it('can generate a record view key from a view key and a record ciphertext', () => {
461-
const generatedRecordViewKey = EncryptionToolkit.generateRecordViewkey(viewKey, recordCiphertext);
459+
const generatedRecordViewKey = EncryptionToolkit.generateRecordViewKey(viewKey, recordCiphertext);
462460
// Ensure the generated record view key is the same as the one used to decrypt
463461
expect(generatedRecordViewKey.toString()).equal(recordViewKey.toString());
464462
});

wasm/src/utilities/encrypt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ impl EncryptionToolkit {
151151

152152
/// Creates a record view key from the view key. This can be later be used to decrypt a
153153
// record without revealing an account's view key.
154-
#[wasm_bindgen(js_name = "generateRecordViewkey")]
154+
#[wasm_bindgen(js_name = "generateRecordViewKey")]
155155
pub fn generate_record_view_key(view_key: &ViewKey, record_ciphertext: &RecordCiphertext) -> Result<Field, String> {
156156
let record_nonce = record_ciphertext.nonce();
157157
Ok(record_nonce.scalar_multiply(&view_key.to_scalar()).to_x_coordinate())

0 commit comments

Comments
 (0)