Skip to content

Commit

Permalink
Merge pull request #3 from RedChillies-Core/feat/sorting
Browse files Browse the repository at this point in the history
Sorting on Leaves Added
  • Loading branch information
GSaphal committed Dec 30, 2021
2 parents 8df5802 + 921f0d3 commit 51ef57f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "merkle-tree-zilliqa-js",
"version": "1.0.2",
"version": "1.0.4",
"description": "A JS Library to generate the merkle tree and gets it's root and proof for any given distribution",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/tree-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const generateTreeforBech32 = (props: DataInterface[]) => {
});
});
const tree = new MerkleTree(leavesData, sha256, {
sortLeaves: true,
sort: true,
});
const merkleRoot = tree.getRoot().toString('hex');
accumulator.forEach((data) => {
Expand All @@ -57,7 +57,7 @@ export const generateTreeforBase16 = (props: DataInterface[]) => {
});
});
const tree = new MerkleTree(leavesData, sha256, {
sortLeaves: true,
sort: true,
});
const merkleRoot = tree.getRoot().toString('hex');
accumulator.forEach((data) => {
Expand Down

0 comments on commit 51ef57f

Please sign in to comment.