Skip to content

Commit

Permalink
docs: syntax fixed. chore: added comments in serialise method of the …
Browse files Browse the repository at this point in the history
…MantarayFork class
  • Loading branch information
Aviksaikat committed Jun 22, 2024
1 parent 650a75f commit a9d6882
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--8<-- CONTRIBUTING.md
--8<-- "CONTRIBUTING.md"
2 changes: 1 addition & 1 deletion docs/license.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--8<-- LICENSE
--8<-- "LICENSE"
3 changes: 3 additions & 0 deletions src/mantaray_py/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ def serialise(self) -> bytes:
if self.node.is_with_metadata_type():
# console.log(json.dumps(self.node.get_metadata()).replace(' ', ''))
json_string = json.dumps(self.node.get_metadata()).replace(" ", "")
# * the uploaded data returned by the bee is very odd. All white spaces are removed from dictionary key pars
# * but the spaces after a `;` is kept as it is. So this is a hacky wat to fix this issue.
# * First remove all white spaces then replace the `;` with a `;` and a spaced followed by ;)
json_string = json_string.replace(";", "; ")
# * default utf-8 encoding
metadata_bytes = json_string.encode()
Expand Down

0 comments on commit a9d6882

Please sign in to comment.