Skip to content
Snippets Groups Projects
Commit 33e93f41 authored by inso's avatar inso
Browse files

InputSource from BMA

parent e1be2c2e
No related branches found
No related tags found
No related merge requests found
...@@ -262,6 +262,15 @@ class InputSource(): ...@@ -262,6 +262,15 @@ class InputSource():
amount = int(data.group(5)) amount = int(data.group(5))
return cls(index, source, number, txhash, amount) return cls(index, source, number, txhash, amount)
@classmethod
def from_bma(cls, bma_data):
index = None
source = bma_data['source']
number = bma_data['number']
txhash = bma_data['fingerprint']
amount = bma_data['amount']
return cls(index, source, number, txhash, amount)
def inline(self): def inline(self):
return "{0}:{1}:{2}:{3}:{4}".format(self.index, return "{0}:{1}:{2}:{3}:{4}".format(self.index,
self.source, self.source,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment