mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Add balance in nominal units when less than one nominal unit
This commit is contained in:
parent
4631dca7b6
commit
89daf2008f
1 changed files with 5 additions and 1 deletions
|
@ -87,8 +87,12 @@ def GetBalance(nick,chan,cmd):
|
|||
balance = redis_hget("balances",nick)
|
||||
if balance == None:
|
||||
balance = 0
|
||||
balance = long(balance)
|
||||
sbalance = AmountToString(balance)
|
||||
SendTo(sendto, "%s's balance is %s" % (nick, sbalance))
|
||||
if balance < coinspecs.atomic_units:
|
||||
SendTo(sendto, "%s's balance is %s (%.16g %s)" % (nick, sbalance, float(balance) / coinspecs.atomic_units, coinspecs.name))
|
||||
else:
|
||||
SendTo(sendto, "%s's balance is %s" % (nick, sbalance))
|
||||
except Exception, e:
|
||||
log_error('GetBalance: exception: %s' % str(e))
|
||||
SendTo(sendto, "An error has occured")
|
||||
|
|
Loading…
Reference in a new issue