Group swap transactions in Qt history (fixes #6237)
- use tree structure of QTreeView - grouped items have a 'group_id' field - rename 'Normal' swap as 'Forward'
This commit is contained in:
@@ -177,6 +177,9 @@ class Satoshis(object):
|
||||
def __ne__(self, other):
|
||||
return not (self == other)
|
||||
|
||||
def __add__(self, other):
|
||||
return Satoshis(self.value + other.value)
|
||||
|
||||
|
||||
# note: this is not a NamedTuple as then its json encoding cannot be customized
|
||||
class Fiat(object):
|
||||
@@ -216,6 +219,10 @@ class Fiat(object):
|
||||
def __ne__(self, other):
|
||||
return not (self == other)
|
||||
|
||||
def __add__(self, other):
|
||||
assert self.ccy == other.ccy
|
||||
return Fiat(self.value + other.value, self.ccy)
|
||||
|
||||
|
||||
class MyEncoder(json.JSONEncoder):
|
||||
def default(self, obj):
|
||||
|
||||
Reference in New Issue
Block a user