mirror of
https://git.wownero.com/lza_menace/wownero-python.git
synced 2024-08-15 03:25:25 +00:00
Return None when spend key is zero (view-only wallet)
This commit is contained in:
parent
005076e8a2
commit
5ee551fa4a
1 changed files with 6 additions and 3 deletions
|
@ -54,11 +54,14 @@ class Wallet(object):
|
|||
|
||||
def spend_key(self):
|
||||
"""
|
||||
Returns private spend key.
|
||||
Returns private spend key. None if wallet is view-only.
|
||||
|
||||
:rtype: str
|
||||
:rtype: str or None
|
||||
"""
|
||||
return self._backend.spend_key()
|
||||
key = self._backend.spend_key()
|
||||
if key.strip('0') == '':
|
||||
return None
|
||||
return key
|
||||
|
||||
def view_key(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue