From 2d364218cc00535a4b7cf56ca8c51436884c2d36 Mon Sep 17 00:00:00 2001 From: Arnaud Schenk Date: Mon, 20 Jul 2020 11:56:30 +0100 Subject: [PATCH] fix(aztec.js): save the owner address instead of public key --- packages/aztec.js/src/note/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/aztec.js/src/note/index.js b/packages/aztec.js/src/note/index.js index 192592708..dcee0336d 100644 --- a/packages/aztec.js/src/note/index.js +++ b/packages/aztec.js/src/note/index.js @@ -311,8 +311,8 @@ export async function fromEventLog(logNoteData, spendingKey = null) { const newNote = new Note(notePublicKey, null); if (spendingKey) { await newNote.derive(spendingKey); - const { publicKey } = secp256k1.accountFromPrivateKey(spendingKey); - newNote.owner = publicKey; + const { address } = secp256k1.accountFromPrivateKey(spendingKey); + newNote.owner = address; } return newNote; }