|
@ -607,10 +607,13 @@ def payto_loop(): |
|
|
if data: |
|
|
if data: |
|
|
print "data", data |
|
|
print "data", data |
|
|
if re.match('^bitcoin:', data): |
|
|
if re.match('^bitcoin:', data): |
|
|
payto, amount, label, message, _ = util.parse_URI(data) |
|
|
rr = util.parse_URI(data) |
|
|
|
|
|
amount = rr.get('amount') |
|
|
|
|
|
address = rr.get('address') |
|
|
|
|
|
message = rr.get('message', '') |
|
|
if amount: |
|
|
if amount: |
|
|
amount = str(amount / COIN) |
|
|
amount = str(Decimal(amount)/COIN) |
|
|
droid.fullSetProperty("recipient", "text", payto) |
|
|
droid.fullSetProperty("recipient", "text", address) |
|
|
droid.fullSetProperty("amount", "text", amount) |
|
|
droid.fullSetProperty("amount", "text", amount) |
|
|
droid.fullSetProperty("message", "text", message) |
|
|
droid.fullSetProperty("message", "text", message) |
|
|
elif is_address(data): |
|
|
elif is_address(data): |
|
@ -771,7 +774,7 @@ def settings_loop(): |
|
|
|
|
|
|
|
|
def set_listview(): |
|
|
def set_listview(): |
|
|
host, port, p, proxy_config, auto_connect = network.get_parameters() |
|
|
host, port, p, proxy_config, auto_connect = network.get_parameters() |
|
|
fee = str(Decimal(wallet.fee_per_kb) / COIN) |
|
|
fee = str(Decimal(wallet.fee_per_kb(config)) / COIN) |
|
|
is_encrypted = 'yes' if wallet.use_encryption else 'no' |
|
|
is_encrypted = 'yes' if wallet.use_encryption else 'no' |
|
|
protocol = protocol_name(p) |
|
|
protocol = protocol_name(p) |
|
|
droid.fullShow(settings_layout) |
|
|
droid.fullShow(settings_layout) |
|
@ -818,8 +821,10 @@ def settings_loop(): |
|
|
network_changed = True |
|
|
network_changed = True |
|
|
|
|
|
|
|
|
elif pos == "3": #fee |
|
|
elif pos == "3": #fee |
|
|
fee = modal_input('Transaction fee', 'The fee will be this amount multiplied by the number of inputs in your transaction. ', |
|
|
fee = modal_input( |
|
|
str(Decimal(wallet.fee_per_kb) / COIN), "numberDecimal") |
|
|
'Transaction fee', |
|
|
|
|
|
'The fee will be this amount multiplied by the number of inputs in your transaction. ', |
|
|
|
|
|
str(Decimal(wallet.fee_per_kb(config)) / COIN), "numberDecimal") |
|
|
if fee: |
|
|
if fee: |
|
|
try: |
|
|
try: |
|
|
fee = int(COIN * Decimal(fee)) |
|
|
fee = int(COIN * Decimal(fee)) |
|
@ -900,7 +905,7 @@ config = None |
|
|
class ElectrumGui: |
|
|
class ElectrumGui: |
|
|
|
|
|
|
|
|
def __init__(self, _config, _network): |
|
|
def __init__(self, _config, _network): |
|
|
global wallet, network, contacts |
|
|
global wallet, network, contacts, config |
|
|
network = _network |
|
|
network = _network |
|
|
config = _config |
|
|
config = _config |
|
|
network.register_callback('updated', update_callback) |
|
|
network.register_callback('updated', update_callback) |
|
|