mirror of
https://git.wownero.com/lza_menace/wownero-python.git
synced 2024-08-15 03:25:25 +00:00
Merge branch 'master' into lialsoftlab-tx_confirmations
This commit is contained in:
commit
55ce01f555
3 changed files with 13 additions and 4 deletions
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -38,3 +38,6 @@ class TransactionNotFound(AccountException):
|
|||
|
||||
class SignatureCheckFailed(MoneroException):
|
||||
pass
|
||||
|
||||
class WalletIsNotDeterministic(MoneroException):
|
||||
pass
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue