From 6b61787e3e484ca98cbf3539ee9648874cb2c16c Mon Sep 17 00:00:00 2001 From: owl352 Date: Thu, 2 Jan 2025 21:51:16 +0500 Subject: [PATCH] initial commit --- packages/api/src/utils.js | 3 ++- packages/api/test/unit/utils.spec.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/api/src/utils.js b/packages/api/src/utils.js index 57a3e334a..7d3d8a161 100644 --- a/packages/api/src/utils.js +++ b/packages/api/src/utils.js @@ -73,7 +73,8 @@ const decodeStateTransition = async (client, base64) => { dataContractId: documentTransition.getDataContractId().toString(), revision: documentTransition.getRevision(), type: documentTransition.getType(), - action: documentTransition.getAction() + action: documentTransition.getAction(), + nonce: Number(documentTransition.getIdentityContractNonce()) } switch (documentTransition.getAction()) { diff --git a/packages/api/test/unit/utils.spec.js b/packages/api/test/unit/utils.spec.js index a9639729b..4e3e2c0e2 100644 --- a/packages/api/test/unit/utils.spec.js +++ b/packages/api/test/unit/utils.spec.js @@ -85,6 +85,7 @@ describe('Utils', () => { prefundedBalance: null, type: 'note', action: 0, + nonce: 2, entropy: 'f09a3ceacaa2f12b9879ba223d5b8c66c3106efe58edc511556f31ee9676412b', data: { message: 'Tutorial CI Test @ Thu, 08 Aug 2024 20:25:03 GMT'