proto.eth.tw.view: remove age_disp()
This commit is contained in:
parent
24bdbae960
commit
3662b859da
2 changed files with 7 additions and 9 deletions
|
|
@ -16,9 +16,6 @@ from ....tw.view import TwView
|
|||
|
||||
class EthereumTwView(TwView):
|
||||
|
||||
def age_disp(self, o, age_fmt): # TODO
|
||||
pass
|
||||
|
||||
def get_disp_prec(self, wide):
|
||||
return self.proto.coin_amt.max_prec if wide else 8
|
||||
|
||||
|
|
|
|||
|
|
@ -226,12 +226,13 @@ class TwView(MMGenObject, metaclass=AsyncInit):
|
|||
self._age_fmt = val
|
||||
|
||||
def age_disp(self, o, age_fmt):
|
||||
if age_fmt == 'confs':
|
||||
return o.confs or '-'
|
||||
elif age_fmt == 'block':
|
||||
return self.rpc.blockcount + 1 - o.confs if o.confs else '-'
|
||||
else:
|
||||
return self.date_formatter[age_fmt](self.rpc, o.date)
|
||||
if self.has_age:
|
||||
if age_fmt == 'confs':
|
||||
return o.confs or '-'
|
||||
elif age_fmt == 'block':
|
||||
return self.rpc.blockcount + 1 - o.confs if o.confs else '-'
|
||||
else:
|
||||
return self.date_formatter[age_fmt](self.rpc, o.date)
|
||||
|
||||
def get_disp_prec(self, wide):
|
||||
return self.proto.coin_amt.max_prec
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue