Support for confirmations number in transactions.
This commit is contained in:
parent
339363b575
commit
4fc8495727
|
@ -267,6 +267,7 @@ class JSONRPCWallet(object):
|
||||||
'height': data.get('height', data.get('block_height')) or None,
|
'height': data.get('height', data.get('block_height')) or None,
|
||||||
'timestamp': datetime.fromtimestamp(data['timestamp']) if 'timestamp' in data else None,
|
'timestamp': datetime.fromtimestamp(data['timestamp']) if 'timestamp' in data else None,
|
||||||
'blob': data.get('blob', None),
|
'blob': data.get('blob', None),
|
||||||
|
'confirmations': data.get('confirmations', None)
|
||||||
})
|
})
|
||||||
|
|
||||||
def export_outputs(self):
|
def export_outputs(self):
|
||||||
|
|
|
@ -70,6 +70,7 @@ class Transaction(object):
|
||||||
timestamp = None
|
timestamp = None
|
||||||
key = None
|
key = None
|
||||||
blob = None
|
blob = None
|
||||||
|
confirmations = None
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
self.hash = kwargs.get('hash', self.hash)
|
self.hash = kwargs.get('hash', self.hash)
|
||||||
|
@ -78,6 +79,7 @@ class Transaction(object):
|
||||||
self.timestamp = kwargs.get('timestamp', self.timestamp)
|
self.timestamp = kwargs.get('timestamp', self.timestamp)
|
||||||
self.key = kwargs.get('key', self.key)
|
self.key = kwargs.get('key', self.key)
|
||||||
self.blob = kwargs.get('blob', self.blob)
|
self.blob = kwargs.get('blob', self.blob)
|
||||||
|
self.confirmations = kwargs.get('confirmations', self.confirmations)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return self.hash
|
return self.hash
|
||||||
|
|
Loading…
Reference in New Issue