qt history list: fix shortcut in refresh()
This commit is contained in:
@@ -146,6 +146,12 @@ class Satoshis(object):
|
|||||||
def __str__(self):
|
def __str__(self):
|
||||||
return format_satoshis(self.value) + " BTC"
|
return format_satoshis(self.value) + " BTC"
|
||||||
|
|
||||||
|
def __eq__(self, other):
|
||||||
|
return self.value == other.value
|
||||||
|
|
||||||
|
def __ne__(self, other):
|
||||||
|
return not (self == other)
|
||||||
|
|
||||||
|
|
||||||
# note: this is not a NamedTuple as then its json encoding cannot be customized
|
# note: this is not a NamedTuple as then its json encoding cannot be customized
|
||||||
class Fiat(object):
|
class Fiat(object):
|
||||||
@@ -166,6 +172,12 @@ class Fiat(object):
|
|||||||
else:
|
else:
|
||||||
return "{:.2f}".format(self.value) + ' ' + self.ccy
|
return "{:.2f}".format(self.value) + ' ' + self.ccy
|
||||||
|
|
||||||
|
def __eq__(self, other):
|
||||||
|
return self.ccy == other.ccy and self.value == other.value
|
||||||
|
|
||||||
|
def __ne__(self, other):
|
||||||
|
return not (self == other)
|
||||||
|
|
||||||
|
|
||||||
class MyEncoder(json.JSONEncoder):
|
class MyEncoder(json.JSONEncoder):
|
||||||
def default(self, obj):
|
def default(self, obj):
|
||||||
|
|||||||
Reference in New Issue
Block a user