mirror of
https://git.wownero.com/lza_menace/wownero-python.git
synced 2024-08-15 03:25:25 +00:00
Remove compatibility and most references to archaic version of Monero
This commit is contained in:
parent
864829b858
commit
3358e5a30a
5 changed files with 8 additions and 27 deletions
|
@ -130,7 +130,6 @@ class JSONRPCWallet(object):
|
|||
return self.raw_request('getheight')['height']
|
||||
|
||||
def spend_key(self):
|
||||
# NOTE: This will fail on 0.11.x, the method was missing
|
||||
return self.raw_request('query_key', {'key_type': 'spend_key'})['key']
|
||||
|
||||
def view_key(self):
|
||||
|
@ -158,10 +157,6 @@ class JSONRPCWallet(object):
|
|||
|
||||
def addresses(self, account=0):
|
||||
_addresses = self.raw_request('getaddress', {'account_index': account})
|
||||
if 'addresses' not in _addresses:
|
||||
# monero <= 0.11
|
||||
_log.debug('Monero <= 0.11 found, assuming single address')
|
||||
return [Address(_addresses['address'])]
|
||||
addresses = [None] * (max(map(operator.itemgetter('address_index'), _addresses['addresses'])) + 1)
|
||||
for _addr in _addresses['addresses']:
|
||||
addresses[_addr['address_index']] = address(
|
||||
|
@ -329,10 +324,6 @@ class JSONRPCWallet(object):
|
|||
if 'error' in result:
|
||||
err = result['error']
|
||||
_log.error(u"JSON RPC error:\n{result}".format(result=_ppresult))
|
||||
# XXX: workaround for 0.11 bug throwing a wrong error code
|
||||
if err['code'] == -4 and 'not enough money' in err['message']:
|
||||
raise exceptions.NotEnoughMoney(err['message'])
|
||||
#
|
||||
if err['code'] in _err2exc:
|
||||
raise _err2exc[err['code']](err['message'])
|
||||
else:
|
||||
|
|
|
@ -15,9 +15,10 @@ class Wallet(object):
|
|||
|
||||
Provides interface to operate on a wallet.
|
||||
|
||||
Wallet consists of :class:`accounts <monero.account.Account>`. In Monero 0.11 and earlier the wallet has only a single account
|
||||
with index 0. In later versions there might be multiple accounts, but a fresh wallet starts
|
||||
with only one.
|
||||
A wallet consists of :class:`accounts <monero.account.Account>`. Fresh wallets start
|
||||
with only one account but you may create more. Although it's possible to combine funds
|
||||
from different accounts, or even wallets, in a single transaction, this code closely
|
||||
follows the idea of separation introduced in the original wallet software.
|
||||
|
||||
The list of accounts will be initialized under the `accounts` attribute.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue