Skip to content
Snippets Groups Projects

#122: display relative to average money share

Merged #122: display relative to average money share
All threads resolved!
Merged matograine requested to merge (removed):dev_mato into dev
All threads resolved!
+ 18
1
@@ -33,6 +33,7 @@ def show_amount_from_pubkey(pubkey, value):
@@ -33,6 +33,7 @@ def show_amount_from_pubkey(pubkey, value):
currency_symbol = CurrencySymbol().symbol
currency_symbol = CurrencySymbol().symbol
ud_value = UDValue().ud_value
ud_value = UDValue().ud_value
 
average, monetary_mass = get_average()
if totalAmountInput - amount != 0:
if totalAmountInput - amount != 0:
print("Blockchain:")
print("Blockchain:")
print("-----------")
print("-----------")
@@ -61,9 +62,25 @@ def show_amount_from_pubkey(pubkey, value):
@@ -61,9 +62,25 @@ def show_amount_from_pubkey(pubkey, value):
"UD",
"UD",
currency_symbol,
currency_symbol,
)
)
 
print("Total Quantitative =", round(totalAmountInput / 100, 2), currency_symbol)
print(
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):
def get_amount_from_pubkey(pubkey):
Loading