time_str = str( dt.time() )
else:
time_str = str( dt.date() )
- except:
+ except Exception:
time_str = 'pending'
conf_str = 'v' if conf else 'o'
try:
tx = wallet.mktx( [(recipient, amount)], password, fee)
- except BaseException, e:
+ except Exception as e:
modal_dialog('error', e.message)
droid.dialogDismiss()
return
data = r['extras']['SCAN_RESULT']
if data:
if re.match('^bitcoin:', data):
- address, _, _, _, _, _, _ = util.parse_url(data)
+ address, _, _, _, _ = util.parse_URI(data)
elif is_valid(data):
address = data
else:
try:
amount = int( 100000000 * Decimal(amount) )
- except:
+ except Exception:
modal_dialog('Error','Invalid amount')
continue
data = r['extras']['SCAN_RESULT']
if data:
if re.match('^bitcoin:', data):
- payto, amount, label, _, _, _, _ = util.parse_url(data)
+ payto, amount, label, _, _ = util.parse_URI(data)
droid.fullSetProperty("recipient", "text",payto)
droid.fullSetProperty("amount", "text", amount)
droid.fullSetProperty("label", "text", label)
try:
seed = wallet.get_seed(password)
- except:
+ except Exception:
modal_dialog('error','incorrect password')
return
try:
wallet.get_seed(password)
- except:
+ except Exception:
modal_dialog('error','incorrect password')
return
if fee:
try:
fee = int( 100000000 * Decimal(fee) )
- except:
+ except Exception:
modal_dialog('error','invalid fee value')
wallet.set_fee(fee)
set_listview()
auto_connect = False
try:
network.set_parameters(host, port, protocol, proxy, auto_connect)
- except:
+ except Exception:
modal_dialog('error','invalid server')
set_listview()
if action == 'create':
wallet.init_seed(None)
self.show_seed()
- wallet.save_seed()
- wallet.create_accounts()
+ wallet.save_seed(None)
wallet.synchronize() # generate first addresses offline
elif action == 'restore':
if not seed:
exit()
wallet.init_seed(str(seed))
- wallet.save_seed()
+ wallet.save_seed(None)
else:
exit()
m = modal_input('Mnemonic','please enter your code')
try:
seed = mnemonic_decode(m.split(' '))
- except:
+ except Exception:
modal_dialog('error: could not decode this seed')
return
def network_dialog(self):
return True
- def verify_seed(self):
- wallet.save_seed()
- return True
def show_seed(self):
modal_dialog('Your seed is:', wallet.seed)