Merge branch 'master' into lialsoftlab-tx_confirmations
This commit is contained in:
commit
55ce01f555
|
@ -369,7 +369,8 @@ _err2exc = {
|
||||||
-16: exceptions.TransactionNotPossible,
|
-16: exceptions.TransactionNotPossible,
|
||||||
-17: exceptions.NotEnoughMoney,
|
-17: exceptions.NotEnoughMoney,
|
||||||
-20: exceptions.AmountIsZero,
|
-20: exceptions.AmountIsZero,
|
||||||
-37: exceptions.NotEnoughUnlockedMoney, # PR pending: https://github.com/monero-project/monero/pull/3197
|
-37: exceptions.NotEnoughUnlockedMoney,
|
||||||
-38: exceptions.NoDaemonConnection, # PR 3197
|
-38: exceptions.NoDaemonConnection,
|
||||||
|
-43: exceptions.WalletIsNotDeterministic, # https://github.com/monero-project/monero/pull/4653
|
||||||
-32601: MethodNotFound,
|
-32601: MethodNotFound,
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,3 +38,6 @@ class TransactionNotFound(AccountException):
|
||||||
|
|
||||||
class SignatureCheckFailed(MoneroException):
|
class SignatureCheckFailed(MoneroException):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
class WalletIsNotDeterministic(MoneroException):
|
||||||
|
pass
|
||||||
|
|
|
@ -4,7 +4,8 @@ import logging
|
||||||
import operator
|
import operator
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from monero.backends.jsonrpc import JSONRPCWallet
|
from monero import exceptions
|
||||||
|
from monero.backends.jsonrpc import JSONRPCWallet, RPCError
|
||||||
from monero.wallet import Wallet
|
from monero.wallet import Wallet
|
||||||
|
|
||||||
def url_data(url):
|
def url_data(url):
|
||||||
|
@ -54,6 +55,10 @@ print(
|
||||||
addr=a2str(masteraddr),
|
addr=a2str(masteraddr),
|
||||||
total=w.balance(),
|
total=w.balance(),
|
||||||
unlocked=w.balance(unlocked=True)))
|
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(
|
print(
|
||||||
"Keys:\n" \
|
"Keys:\n" \
|
||||||
" private spend: {ssk}\n" \
|
" private spend: {ssk}\n" \
|
||||||
|
@ -65,7 +70,7 @@ print(
|
||||||
svk=w.view_key(),
|
svk=w.view_key(),
|
||||||
psk=masteraddr.spend_key(),
|
psk=masteraddr.spend_key(),
|
||||||
pvk=masteraddr.view_key(),
|
pvk=masteraddr.view_key(),
|
||||||
seed=w.seed()
|
seed=seed
|
||||||
))
|
))
|
||||||
|
|
||||||
if len(w.accounts) > 1:
|
if len(w.accounts) > 1:
|
||||||
|
|
Loading…
Reference in New Issue