diff --git a/bitshares/wallet.py b/bitshares/wallet.py
index <HASH>..<HASH> 100644
--- a/bitshares/wallet.py
+++ b/bitshares/wallet.py
@@ -339,12 +339,12 @@ class Wallet():
     def getKeyType(self, account, pub):
         """ Get key type
         """
-        if pub == account["options"]["memo_key"]:
-            return "memo"
         for authority in ["owner", "active"]:
             for key in account[authority]["key_auths"]:
                 if pub == key[0]:
                     return authority
+        if pub == account["options"]["memo_key"]:
+            return "memo"
         return None
 
     def getAccounts(self):
[wallet] active keys have priority over memo keys