pylint throughout (excluding tests) - unused variables
This commit is contained in:
parent
881c6fea03
commit
a4cb7e3c72
32 changed files with 53 additions and 69 deletions
|
|
@ -63,7 +63,7 @@ class AddrFile(MMGenObject):
|
|||
('.' + self.parent.proto.network) if self.parent.proto.testnet else '',
|
||||
self.ext )
|
||||
|
||||
def write(self,fn=None,ask_tty=True,binary=False,desc=None,ask_overwrite=True):
|
||||
def write(self,fn=None,binary=False,desc=None,ask_overwrite=True):
|
||||
from .fileutil import write_data_to_file
|
||||
write_data_to_file(
|
||||
self.cfg,
|
||||
|
|
|
|||
|
|
@ -711,7 +711,6 @@ def init_genonly_altcoins(usr_coin=None,testnet=False):
|
|||
if usr_coin is None:
|
||||
for network in networks:
|
||||
data[network] = CoinInfo.get_supported_coins(network)
|
||||
trust_level = 0
|
||||
else:
|
||||
if usr_coin.lower() in gc.core_coins: # core coin, so return immediately
|
||||
from .protocol import CoinProtocol
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ class Crypto:
|
|||
|
||||
def sha256_rounds(self,s):
|
||||
from hashlib import sha256
|
||||
for i in range(self.scramble_hash_rounds):
|
||||
for _ in range(self.scramble_hash_rounds):
|
||||
s = sha256(s).digest()
|
||||
return s
|
||||
|
||||
|
|
@ -373,7 +373,7 @@ class Crypto:
|
|||
if self.cfg.echo_passphrase:
|
||||
pw = ' '.join(get_words_from_user( self.cfg, f'Enter {pw_desc} for {data_desc}: ' ))
|
||||
else:
|
||||
for i in range(gc.passwd_max_tries):
|
||||
for _ in range(gc.passwd_max_tries):
|
||||
pw = ' '.join(get_words_from_user( self.cfg, f'Enter {pw_desc} for {data_desc}: ' ))
|
||||
pw_chk = ' '.join(get_words_from_user( self.cfg, f'Repeat {pw_desc}: ' ))
|
||||
self.util.dmsg(f'Passphrases: [{pw}] [{pw_chk}]')
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ class Daemon(Lockable):
|
|||
return True
|
||||
|
||||
def wait_for_state(self,req_state):
|
||||
for i in range(300):
|
||||
for _ in range(300):
|
||||
if self.state == req_state:
|
||||
return True
|
||||
time.sleep(0.2)
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ async def main():
|
|||
msg(orig_tx.info.format(terse=True))
|
||||
|
||||
kal = get_keyaddrlist(cfg,orig_tx.proto)
|
||||
kl = get_keylist(cfg,orig_tx.proto)
|
||||
kl = get_keylist(cfg)
|
||||
sign_and_send = bool(seed_files or kl or kal)
|
||||
|
||||
from .tw.ctl import TwCtl
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ async def main():
|
|||
caller = 'txdo' )
|
||||
|
||||
kal = get_keyaddrlist(cfg,cfg._proto)
|
||||
kl = get_keylist(cfg,cfg._proto)
|
||||
kl = get_keylist(cfg)
|
||||
|
||||
tx3 = await txsign(cfg,tx2,seed_files,kl,kal)
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ if not cfg.info and not cfg.terse_info:
|
|||
|
||||
from .tx.sign import txsign,get_tx_files,get_seed_files,get_keylist,get_keyaddrlist
|
||||
|
||||
tx_files = get_tx_files(cfg,infiles)
|
||||
tx_files = get_tx_files(infiles)
|
||||
seed_files = get_seed_files(cfg,infiles)
|
||||
|
||||
async def main():
|
||||
|
|
@ -149,7 +149,7 @@ async def main():
|
|||
tx1.info.view_with_prompt(f'View data for transaction{tx_num_disp}?')
|
||||
|
||||
kal = get_keyaddrlist(cfg,tx1.proto)
|
||||
kl = get_keylist(cfg,tx1.proto)
|
||||
kl = get_keylist(cfg)
|
||||
|
||||
tx2 = await txsign(cfg,tx1,seed_files,kl,kal,tx_num_disp)
|
||||
if tx2:
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class MnEntryModeFull(MnEntryMode):
|
|||
def get_word(self,mne):
|
||||
s,pad = ('', 0)
|
||||
while True:
|
||||
ch,s,foo = self.get_char(s)
|
||||
ch,s,_ = self.get_char(s)
|
||||
if ch in _return_chars:
|
||||
if s:
|
||||
break
|
||||
|
|
@ -116,7 +116,7 @@ class MnEntryModeShort(MnEntryMode):
|
|||
def get_word(self,mne):
|
||||
s,pad = ('', 0)
|
||||
while True:
|
||||
ch,s,foo = self.get_char(s)
|
||||
ch,s,_ = self.get_char(s)
|
||||
if ch in _return_chars:
|
||||
if s:
|
||||
break
|
||||
|
|
@ -159,7 +159,7 @@ class MnEntryModeFixed(MnEntryMode):
|
|||
def get_word(self,mne):
|
||||
s,pad = ('', 0)
|
||||
while True:
|
||||
ch,s,foo = self.get_char(s)
|
||||
ch,s,_ = self.get_char(s)
|
||||
if ch in _return_chars:
|
||||
if s:
|
||||
break
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class UserOpts:
|
|||
self.usage_data = od['text'].get('usage2') or od['text']['usage']
|
||||
|
||||
# po: (user_opts,cmd_args,opts,filtered_opts)
|
||||
po = parsed_opts or Opts.parse_opts(od,opt_filter=opt_filter,parse_only=parse_only)
|
||||
po = parsed_opts or Opts.parse_opts(od,opt_filter=opt_filter)
|
||||
|
||||
cfg._args = po.cmd_args
|
||||
cfg._uopts = uopts = po.user_opts
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ class PasswordList(AddrList):
|
|||
return
|
||||
if self.hex2bip39:
|
||||
ymsg(self.feature_warn_fs.format(pw_fmt))
|
||||
self.set_pw_len_vs_seed_len(pw_len,seed) # sets self.bip39, self.xmrseed, self.xmrproto self.baseconv
|
||||
self.set_pw_len_vs_seed_len(seed) # sets self.bip39, self.xmrseed, self.xmrproto self.baseconv
|
||||
self.al_id = AddrListID( sid=seed.sid, mmtype=MMGenPasswordType(self.proto,'P') )
|
||||
self.data = self.generate(seed,pw_idxs)
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ class PasswordList(AddrList):
|
|||
self.pw_len = int(pw_len)
|
||||
self.chk_pw_len()
|
||||
|
||||
def set_pw_len_vs_seed_len(self,pw_len,seed):
|
||||
def set_pw_len_vs_seed_len(self,seed):
|
||||
pf = self.pw_fmt
|
||||
if pf == 'hex':
|
||||
pw_bytes = self.pw_len // 2
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ class BitcoinTwGetBalance(TwGetBalance):
|
|||
|
||||
async def create_data(self):
|
||||
lbl_id = ('account','label')['label_api' in self.rpc.caps]
|
||||
amt0 = self.proto.coin_amt('0')
|
||||
for d in await self.rpc.call('listunspent',0):
|
||||
tw_lbl = get_tw_label(self.proto,d[lbl_id])
|
||||
if tw_lbl:
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class TxInfo(TxInfo):
|
|||
Fee: {a} {c}{r}
|
||||
""")
|
||||
|
||||
def format_rel_fee(self,terse):
|
||||
def format_rel_fee(self):
|
||||
tx = self.tx
|
||||
return ' ({} {}, {} of spend amount)'.format(
|
||||
pink(str(tx.fee_abs2rel(tx.fee))),
|
||||
|
|
|
|||
|
|
@ -95,28 +95,24 @@ class TokenCommon(MMGenObject):
|
|||
self,
|
||||
to_addr,
|
||||
amt,
|
||||
method_sig = 'transfer(address,uint256)',
|
||||
from_addr = None):
|
||||
from_arg = from_addr.rjust(64,'0') if from_addr else ''
|
||||
method_sig = 'transfer(address,uint256)'):
|
||||
from_arg = ''
|
||||
to_arg = to_addr.rjust(64,'0')
|
||||
amt_arg = '{:064x}'.format( int(amt / self.base_unit) )
|
||||
return self.create_method_id(method_sig) + from_arg + to_arg + amt_arg
|
||||
|
||||
def make_tx_in(
|
||||
self,
|
||||
from_addr,
|
||||
to_addr,
|
||||
amt,
|
||||
start_gas,
|
||||
gasPrice,
|
||||
nonce,
|
||||
method_sig = 'transfer(address,uint256)',
|
||||
from_addr2 = None):
|
||||
method_sig = 'transfer(address,uint256)'):
|
||||
data = self.create_data(
|
||||
to_addr,
|
||||
amt,
|
||||
method_sig = method_sig,
|
||||
from_addr = from_addr2)
|
||||
method_sig = method_sig)
|
||||
return {
|
||||
'to': bytes.fromhex(self.addr),
|
||||
'startgas': start_gas.toWei(),
|
||||
|
|
@ -162,18 +158,14 @@ class TokenCommon(MMGenObject):
|
|||
key,
|
||||
start_gas,
|
||||
gasPrice,
|
||||
method_sig = 'transfer(address,uint256)',
|
||||
from_addr2=None,
|
||||
return_data=False):
|
||||
method_sig = 'transfer(address,uint256)'):
|
||||
tx_in = self.make_tx_in(
|
||||
from_addr,
|
||||
to_addr,
|
||||
amt,
|
||||
start_gas,
|
||||
gasPrice,
|
||||
nonce = int(await self.rpc.call('eth_getTransactionCount','0x'+from_addr,'pending'),16),
|
||||
method_sig = method_sig,
|
||||
from_addr2 = from_addr2 )
|
||||
method_sig = method_sig)
|
||||
txhex,_ = await self.txsign(tx_in,key,from_addr)
|
||||
return await self.txsend(txhex)
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class Base(TxBase.Base):
|
|||
def is_replaceable(self):
|
||||
return True
|
||||
|
||||
async def get_receipt(self,txid,silent=False):
|
||||
async def get_receipt(self,txid):
|
||||
rx = await self.rpc.call('eth_getTransactionReceipt','0x'+txid) # -> null if pending
|
||||
if not rx:
|
||||
return None
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class TxInfo(TxInfo):
|
|||
def format_abs_fee(self,color,iwidth):
|
||||
return self.tx.fee.fmt(color=color,iwidth=iwidth) + (' (max)' if self.tx.txobj['data'] else '')
|
||||
|
||||
def format_rel_fee(self,terse):
|
||||
def format_rel_fee(self):
|
||||
return ' ({} of spend amount)'.format(
|
||||
pink('{:0.6f}%'.format( self.tx.fee / self.tx.send_amt * 100 ))
|
||||
)
|
||||
|
|
@ -73,7 +73,7 @@ class TxInfo(TxInfo):
|
|||
class TokenTxInfo(TxInfo):
|
||||
fmt_keys = ('from','token_to','amt','nonce')
|
||||
|
||||
def format_rel_fee(self,terse):
|
||||
def format_rel_fee(self):
|
||||
return ''
|
||||
|
||||
def format_body(self,*args,**kwargs):
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class TokenOnlineSigned(TokenSigned,OnlineSigned):
|
|||
def parse_txfile_serialized_data(self):
|
||||
from ....addr import TokenAddr
|
||||
from ..contract import Token
|
||||
d = OnlineSigned.parse_txfile_serialized_data(self)
|
||||
OnlineSigned.parse_txfile_serialized_data(self)
|
||||
o = self.txobj
|
||||
assert self.twctl.token == o['to']
|
||||
o['token_addr'] = TokenAddr(self.proto,o['to'])
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class Unsigned(Completed,TxBase.Unsigned):
|
|||
self.txobj = o
|
||||
return d # 'token_addr','decimals' required by Token subclass
|
||||
|
||||
async def do_sign(self,wif,tx_num_str):
|
||||
async def do_sign(self,wif):
|
||||
o = self.txobj
|
||||
o_conv = {
|
||||
'to': bytes.fromhex(o['to']),
|
||||
|
|
@ -77,7 +77,7 @@ class Unsigned(Completed,TxBase.Unsigned):
|
|||
msg_r(f'Signing transaction{tx_num_str}...')
|
||||
|
||||
try:
|
||||
await self.do_sign(keys[0].sec.wif,tx_num_str)
|
||||
await self.do_sign(keys[0].sec.wif)
|
||||
msg('OK')
|
||||
from ....tx import SignedTX
|
||||
return await SignedTX(cfg=self.cfg,data=self.__dict__)
|
||||
|
|
@ -97,7 +97,7 @@ class TokenUnsigned(TokenCompleted,Unsigned):
|
|||
o['data'] = t.create_data(o['to'],o['amt'])
|
||||
o['token_to'] = t.transferdata2sendaddr(o['data'])
|
||||
|
||||
async def do_sign(self,wif,tx_num_str):
|
||||
async def do_sign(self,wif):
|
||||
o = self.txobj
|
||||
t = Token(self.cfg,self.proto,o['token_addr'],o['decimals'])
|
||||
tx_in = t.make_tx_in(
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ def process_uopts(opts_data,short_opts,long_opts):
|
|||
|
||||
return uopts,uargs
|
||||
|
||||
def parse_opts(opts_data,opt_filter=None,parse_only=False):
|
||||
def parse_opts(opts_data,opt_filter=None):
|
||||
|
||||
short_opts,long_opts,filtered_opts = [],[],[]
|
||||
def parse_lines(opts_type):
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ rand_h = sha256('.'.join(sys.argv).encode())
|
|||
def fake_urandom(n):
|
||||
|
||||
def gen(rounds):
|
||||
for i in range(rounds):
|
||||
for _ in range(rounds):
|
||||
rand_h.update(b'foo')
|
||||
yield rand_h.digest()
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class tool_cmd(tool_cmd_base):
|
|||
need_proto = True
|
||||
need_addrtype = True
|
||||
|
||||
def _init_generators(self,arg=None):
|
||||
def _init_generators(self):
|
||||
return generator_data(
|
||||
kg = KeyGenerator( self.cfg, self.proto, self.mmtype.pubkey_type ),
|
||||
ag = AddrGenerator( self.cfg, self.proto, self.mmtype ),
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ class tool_cmd(tool_cmd_base):
|
|||
|
||||
from ..util2 import parse_bytespec
|
||||
|
||||
def encrypt_worker(wid):
|
||||
def encrypt_worker():
|
||||
ctr_init_val = os.urandom( Crypto.aesctr_iv_len )
|
||||
c = Cipher( algorithms.AES(key), modes.CTR(ctr_init_val), backend=default_backend() )
|
||||
encryptor = c.encryptor()
|
||||
|
|
@ -118,7 +118,7 @@ class tool_cmd(tool_cmd_base):
|
|||
q1,q2 = ( Queue(), Queue() )
|
||||
|
||||
for i in range(max(1,threads-2)):
|
||||
t = Thread( target=encrypt_worker, args=[i] )
|
||||
t = Thread(target=encrypt_worker)
|
||||
t.daemon = True
|
||||
t.start()
|
||||
|
||||
|
|
|
|||
|
|
@ -132,14 +132,14 @@ def gen_tool_usage():
|
|||
for line in m2.rstrip().split('\n'):
|
||||
yield line.lstrip('\t')
|
||||
|
||||
def gen_tool_cmd_usage(cfg,mod,cmdname):
|
||||
def gen_tool_cmd_usage(mod,cmdname):
|
||||
|
||||
from ..cfg import gc
|
||||
from ..util import capfirst
|
||||
|
||||
cls = main_tool.get_mod_cls(mod)
|
||||
docstr = getattr(cls,cmdname).__doc__.strip()
|
||||
args,kwargs,kwargs_types,flag,ann = main_tool.create_call_sig(cmdname,cls)
|
||||
args,kwargs,kwargs_types,_,ann = main_tool.create_call_sig(cmdname,cls)
|
||||
ARGS = 'ARG' if len(args) == 1 else 'ARGS' if args else ''
|
||||
KWARGS = 'KEYWORD ARG' if len(kwargs) == 1 else 'KEYWORD ARGS' if kwargs else ''
|
||||
|
||||
|
|
@ -183,14 +183,14 @@ def gen_tool_cmd_usage(cfg,mod,cmdname):
|
|||
for line in docstr.split('\n')[1:]:
|
||||
yield line.lstrip('\t')
|
||||
|
||||
def usage(cfg,cmdname=None,exit_val=1):
|
||||
def usage(cmdname=None,exit_val=1):
|
||||
|
||||
from ..util import Msg,die
|
||||
|
||||
if cmdname:
|
||||
for mod,cmdlist in main_tool.mods.items():
|
||||
if cmdname in cmdlist:
|
||||
Msg('\n'.join(gen_tool_cmd_usage(cfg,mod,cmdname)))
|
||||
Msg('\n'.join(gen_tool_cmd_usage(mod,cmdname)))
|
||||
break
|
||||
else:
|
||||
die(1,f'{cmdname!r}: no such tool command')
|
||||
|
|
@ -206,8 +206,8 @@ class tool_cmd(tool_cmd_base):
|
|||
|
||||
def help(self,command_name=''):
|
||||
"display usage information for a single command or all commands"
|
||||
usage(self.cfg,command_name,exit_val=0)
|
||||
usage(command_name,exit_val=0)
|
||||
|
||||
def usage(self,command_name=''):
|
||||
"display usage information for a single command or all commands"
|
||||
usage(self.cfg,command_name,exit_val=0)
|
||||
usage(command_name,exit_val=0)
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ class tool_cmd(tool_cmd_base):
|
|||
parameter.
|
||||
"""
|
||||
from ..tw.ctl import TwCtl
|
||||
ret = await (await TwCtl(self.cfg,self.proto,mode='w')).rescan_blockchain(start_block,stop_block)
|
||||
await (await TwCtl(self.cfg,self.proto,mode='w')).rescan_blockchain(start_block,stop_block)
|
||||
return True
|
||||
|
||||
async def twexport(self,include_amts=True,pretty=False,prune=False,warn_used=False,force=False):
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ class TwTxHistory(TwView):
|
|||
'txid': lambda i: i.txid,
|
||||
}
|
||||
|
||||
async def set_dates(self,foo):
|
||||
async def set_dates(self,_):
|
||||
pass
|
||||
|
||||
@property
|
||||
|
|
|
|||
|
|
@ -636,7 +636,7 @@ class TwView(MMGenObject,metaclass=AsyncInit):
|
|||
line_processing = 'print',
|
||||
color = False ),
|
||||
desc = f'{parent.desc} listing' )
|
||||
except UserNonConfirmation as e:
|
||||
except UserNonConfirmation:
|
||||
parent.oneshot_msg = yellow(f'File {outfile!r} not overwritten by user request')
|
||||
else:
|
||||
parent.oneshot_msg = green(f'Data written to {outfile!r}')
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ class MMGenTxIOList(list,MMGenObject):
|
|||
self.parent = parent
|
||||
if data:
|
||||
assert isinstance(data,list), 'MMGenTxIOList_check1'
|
||||
data = data
|
||||
else:
|
||||
data = list()
|
||||
list.__init__(self,data)
|
||||
|
|
@ -78,8 +77,6 @@ class Base(MMGenObject):
|
|||
coin_txid = None
|
||||
timestamp = None
|
||||
blockcount = None
|
||||
coin = None
|
||||
dcoin = None
|
||||
locktime = None
|
||||
chain = None
|
||||
signed = False
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class TxInfo:
|
|||
C = tx.change.fmt(color=True,iwidth=iwidth),
|
||||
s = tx.send_amt.fmt(color=True,iwidth=iwidth),
|
||||
a = self.format_abs_fee(color=True,iwidth=iwidth),
|
||||
r = self.format_rel_fee(terse),
|
||||
r = self.format_rel_fee(),
|
||||
d = tx.dcoin,
|
||||
c = tx.coin )
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ def add_keys(tx,src,infiles=None,saved_seeds=None,keyaddr_list=None):
|
|||
def _pop_matching_fns(args,cmplist): # strips found args
|
||||
return list(reversed([args.pop(args.index(a)) for a in reversed(args) if get_extension(a) in cmplist]))
|
||||
|
||||
def get_tx_files(cfg,args):
|
||||
def get_tx_files(args):
|
||||
from .unsigned import Unsigned
|
||||
ret = _pop_matching_fns(args,[Unsigned.ext])
|
||||
if not ret:
|
||||
|
|
@ -135,7 +135,7 @@ def get_keyaddrlist(cfg,proto):
|
|||
return KeyAddrList( cfg, proto, cfg.mmgen_keys_from_file )
|
||||
return None
|
||||
|
||||
def get_keylist(cfg,proto):
|
||||
def get_keylist(cfg):
|
||||
if cfg.keys_from_file:
|
||||
from ..fileutil import get_lines_from_file
|
||||
return get_lines_from_file( cfg, cfg.keys_from_file, 'key-address data', trim_comments=True )
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ def do_pager(text):
|
|||
for pager in pagers:
|
||||
try:
|
||||
m = text + ('' if pager == 'less' else end_msg)
|
||||
p = run([pager],input=m.encode(),check=True)
|
||||
run([pager],input=m.encode(),check=True)
|
||||
msg_r('\r')
|
||||
except:
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -102,7 +102,6 @@ class wallet(wallet):
|
|||
return ch
|
||||
else:
|
||||
msg_r(invalid_msg)
|
||||
sleep = self.cfg.err_disp_timeout
|
||||
p = clear_line + prompt_fs
|
||||
|
||||
dierolls,n = [],1
|
||||
|
|
|
|||
|
|
@ -27,9 +27,7 @@ class wallet(wallet):
|
|||
|
||||
def __init__(self,*args,**kwargs):
|
||||
if self.cfg.label:
|
||||
self.label = MMGenWalletLabel(
|
||||
self.cfg.label,
|
||||
msg = "Error in option '--label'" )
|
||||
self.label = MMGenWalletLabel(self.cfg.label)
|
||||
else:
|
||||
self.label = None
|
||||
super().__init__(*args,**kwargs)
|
||||
|
|
@ -140,7 +138,7 @@ class wallet(wallet):
|
|||
msg(f'Hash parameters {" ".join(hash_params)!r} don’t match hash preset {d.hash_preset!r}')
|
||||
return False
|
||||
|
||||
lmin,foo,lmax = sorted(baseconv('b58').seedlen_map_rev) # 22,33,44
|
||||
lmin,_,lmax = sorted(baseconv('b58').seedlen_map_rev) # 22,33,44
|
||||
for i,key in (4,'salt'),(5,'enc_seed'):
|
||||
l = lines[i].split(' ')
|
||||
chk = l.pop(0)
|
||||
|
|
|
|||
|
|
@ -1216,7 +1216,7 @@ class MoneroWalletOps:
|
|||
for acct_idx,acct_data in enumerate(data):
|
||||
for addr_idx,addr_data in enumerate(acct_data['addresses'][1:],1):
|
||||
msg(fs.format(acct_idx, addr_idx, addr_data['address']))
|
||||
ret = self.c.call( 'create_address', account_index=acct_idx )
|
||||
self.c.call( 'create_address', account_index=acct_idx )
|
||||
|
||||
def restore_labels():
|
||||
bmsg(' Restoring labels:')
|
||||
|
|
@ -1246,7 +1246,7 @@ class MoneroWalletOps:
|
|||
data = {'wallet_metadata': restored_data} ).write(add_suf='.bad')
|
||||
die(3,'Fatal error')
|
||||
|
||||
res = await super().process_wallet(d,fn,last)
|
||||
await super().process_wallet(d,fn,last)
|
||||
|
||||
h = self.rpc(self,d)
|
||||
h.open_wallet('newly created')
|
||||
|
|
@ -1559,10 +1559,10 @@ class MoneroWalletOps:
|
|||
a = self.label or f"xmrwallet new {'account' if self.account is None else 'address'}",
|
||||
b = make_timestr() )
|
||||
if self.account is None:
|
||||
acct,addr = h.create_acct(label=label)
|
||||
h.create_acct(label=label)
|
||||
else:
|
||||
msg_r(f'\n Account index: {pink(str(self.account))}')
|
||||
addr = h.create_new_addr(self.account,label=label)
|
||||
h.create_new_addr(self.account,label=label)
|
||||
|
||||
accts_data = h.get_accts()[0]
|
||||
|
||||
|
|
@ -1781,7 +1781,7 @@ class MoneroWalletOps:
|
|||
async def process_wallet(self,d,fn,last):
|
||||
h = self.rpc(self,d)
|
||||
h.open_wallet('source')
|
||||
acct_data,addr_data = h.get_accts(print=False)
|
||||
_,addr_data = h.get_accts(print=False)
|
||||
msg('')
|
||||
MoneroWalletDumpFile.New(
|
||||
parent = self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue