Skip to content
Snippets Groups Projects
Commit a18f3354 authored by Moul's avatar Moul
Browse files

Merge branch 'dev_mato' into 'dev'

#122: display relative to average money share

See merge request !96
parents f5e8c097 5374bd30
No related branches found
No related tags found
1 merge request!96#122: display relative to average money share
......@@ -33,6 +33,7 @@ def show_amount_from_pubkey(pubkey, value):
currency_symbol = CurrencySymbol().symbol
ud_value = UDValue().ud_value
average, monetary_mass = get_average()
if totalAmountInput - amount != 0:
print("Blockchain:")
print("-----------")
......@@ -61,9 +62,25 @@ def show_amount_from_pubkey(pubkey, value):
"UD",
currency_symbol,
)
print("Total Quantitative =", round(totalAmountInput / 100, 2), currency_symbol)
print(
"Total Quantitative =", round(totalAmountInput / 100, 2), currency_symbol + "\n"
"Total Relative to average money share =",
round(totalAmountInput / average, 2),
"× M/N",
)
print(
"Total Relative to monetary mass =",
round((totalAmountInput / monetary_mass) * 100, 3),
"% M" + "\n",
)
def get_average():
head = HeadBlock().head_block
monetary_mass = head["monetaryMass"]
members_count = head["membersCount"]
average = monetary_mass / members_count
return average, monetary_mass
def get_amount_from_pubkey(pubkey):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment