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

Small change in account save

parent 9a61a686
No related branches found
Tags 0.6
No related merge requests found
......@@ -191,29 +191,23 @@ class Account(object):
community.post(bma.blockchain.Membership, {},
{'membership': membership.signed_raw()})
def jsonify_contacts(self):
data = []
for p in self.contacts:
data.append(p.jsonify())
return data
def jsonify(self):
data_communities = []
for c in self.communities:
data_communities.append(c.jsonify())
def jsonify_wallets(self):
data = []
data_wallets = []
for w in self.wallets:
data.append(w.jsonify())
return data
data_wallets.append(w.jsonify())
def jsonify_community(self):
data = []
for c in self.communities:
data.append(c.jsonify())
return data
data_contacts = []
for p in self.contacts:
data_contacts.append(p.jsonify())
def jsonify(self):
data = {'name': self.name,
'salt': self.salt,
'pubkey': self.pubkey,
'communities': self.jsonify_community(),
'wallets': self.jsonify_wallets(),
'contacts': self.jsonify_contacts()}
'communities': data_communities,
'wallets': data_wallets,
'contacts': data_contacts}
return data
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