Merge branch 'master' into lialsoftlab-tx_confirmations

This commit is contained in:
Michał Sałaban 2018-10-18 23:27:33 +02:00
commit 55ce01f555
3 changed files with 13 additions and 4 deletions

View File

@ -369,7 +369,8 @@ _err2exc = {
-16: exceptions.TransactionNotPossible,
-17: exceptions.NotEnoughMoney,
-20: exceptions.AmountIsZero,
-37: exceptions.NotEnoughUnlockedMoney, # PR pending: https://github.com/monero-project/monero/pull/3197
-38: exceptions.NoDaemonConnection, # PR 3197
-37: exceptions.NotEnoughUnlockedMoney,
-38: exceptions.NoDaemonConnection,
-43: exceptions.WalletIsNotDeterministic, # https://github.com/monero-project/monero/pull/4653
-32601: MethodNotFound,
}

View File

@ -38,3 +38,6 @@ class TransactionNotFound(AccountException):
class SignatureCheckFailed(MoneroException):
pass
class WalletIsNotDeterministic(MoneroException):
pass

View File

@ -4,7 +4,8 @@ import logging
import operator
import re
from monero.backends.jsonrpc import JSONRPCWallet
from monero import exceptions
from monero.backends.jsonrpc import JSONRPCWallet, RPCError
from monero.wallet import Wallet
def url_data(url):
@ -54,6 +55,10 @@ print(
addr=a2str(masteraddr),
total=w.balance(),
unlocked=w.balance(unlocked=True)))
try:
seed = w.seed()
except (exceptions.WalletIsNotDeterministic, RPCError): # FIXME: Remove RPCError once PR#4563 is merged in monero
seed = '[--- wallet is not deterministic and has no seed ---]'
print(
"Keys:\n" \
" private spend: {ssk}\n" \
@ -65,7 +70,7 @@ print(
svk=w.view_key(),
psk=masteraddr.spend_key(),
pvk=masteraddr.view_key(),
seed=w.seed()
seed=seed
))
if len(w.accounts) > 1: