From 4fb5296a925ef19e38c8c6b0b4c778e281aae719 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Thu, 3 Apr 2014 14:30:00 +0200 Subject: [PATCH] account:simplification --- lib/account.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/account.py b/lib/account.py index dfb7bd917..e73ad139b 100644 --- a/lib/account.py +++ b/lib/account.py @@ -190,7 +190,7 @@ class BIP32_Account_2of2(BIP32_Account): return address def get_pubkeys(self, sequence): - return sorted([ self.get_pubkey(self.xpub, *sequence ), self.get_pubkey(self.xpub2, *sequence )]) + return sorted(map(lambda x: self.get_pubkey(x, *sequence ), self.get_master_pubkeys())) def get_master_pubkeys(self): return [self.xpub, self.xpub2] @@ -210,9 +210,6 @@ class BIP32_Account_2of3(BIP32_Account_2of2): d['xpub3'] = self.xpub3 return d - def get_pubkeys(self, sequence): - return sorted([ self.get_pubkey(self.xpub, *sequence ), self.get_pubkey(self.xpub2, *sequence ), self.get_pubkey(self.xpub3, *sequence )]) - def get_master_pubkeys(self): return [self.xpub, self.xpub2, self.xpub3]