fix dialog
authorThomasV <thomasv@gitorious>
Sat, 31 Mar 2012 04:39:23 +0000 (06:39 +0200)
committerThomasV <thomasv@gitorious>
Sat, 31 Mar 2012 04:39:23 +0000 (06:39 +0200)
client/electrum

index 9958683..82dd953 100755 (executable)
@@ -113,12 +113,16 @@ if __name__ == '__main__':
         else:
             password = None
 
-        host = raw_input("server (default:%s):"%wallet.host)
-        port = raw_input("port (default:%d):"%wallet.port)
+        w_host, w_port, w_protocol = wallet.server.split(':')
+        host = raw_input("server (default:%s):"%w_host)
+        port = raw_input("port (default:%s):"%w_port)
+        protocol = raw_input("protocol [t=tcp;h=http;n=native] (default:%s):"%w_protocol)
         fee = raw_input("fee (default:%s):"%( str(Decimal(wallet.fee)/100000000)) )
         gap = raw_input("gap limit (default 5):")
-        if host: wallet.host = host
-        if port: wallet.port = int(port)
+        if host: w_host = host
+        if port: w_port = port
+        if protocol: w_protocol = protocol
+        wallet.server = w_host + ':' + w_port + ':' +w_protocol
         if fee: wallet.fee = float(fee)
         if gap: wallet.gap_limit = int(gap)