File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -40,16 +40,22 @@ def main():
40
40
# amounts in cryptonote are encoded in a way which is convenient
41
41
# for a computer, not a user. Thus, its better need to recode them
42
42
# to something user friendly, before displaying them.
43
+ #
44
+ # For examples:
45
+ # 4760000000000 is 4.76
46
+ # 80000000000 is 0.08
47
+ #
43
48
if "result" in response_json :
44
49
if "transfers" in response_json ["result" ]:
45
50
for transfer in response_json ["result" ]["transfers" ]:
46
51
transfer ["amount" ] = float (get_money (str (transfer ["amount" ])))
47
52
53
+
48
54
# pretty print json output
49
55
print (json .dumps (response_json , indent = 4 ))
50
56
51
57
def get_money (amount ):
52
- """decode cryptonote amount format to user friendly format"""
58
+ """decode cryptonote amount format to user friendly format. Hope its correct. """
53
59
54
60
CRYPTONOTE_DISPLAY_DECIMAL_POINT = 12
55
61
You can’t perform that action at this time.
0 commit comments