From e68d5eed0a73a67a993bfc926ce635b2bd9ca639 Mon Sep 17 00:00:00 2001
From: XFT <anonymous@xft.eth>
Date: Thu, 30 Mar 2023 12:57:05 -0400
Subject: [PATCH] padding fix

---
 src/app/core/services/contract.service.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/app/core/services/contract.service.ts b/src/app/core/services/contract.service.ts
index d326516..5b2f6e5 100644
--- a/src/app/core/services/contract.service.ts
+++ b/src/app/core/services/contract.service.ts
@@ -454,7 +454,7 @@ export class ContractService extends BaseService {
     const commitment = buffPedersenHash(preimage)
     const commitmentHex = toFixedHex(commitment)
 
-    const saveNote = `0x${nullifier.toString(16, 'hex').padEnd(62, '0')}${secret.toString(16, 'hex').padEnd(62, '0')}`;
+    const saveNote = `0x${nullifier.toString(16, 'hex').padStart(62, '0')}${secret.toString(16, 'hex').padStart(62, '0')}`;
     const hexNote = `0x${preimage.toString('hex')}`
 
     const password = this.getOrSetPasswordLocally();
-- 
GitLab