if (walletData == null) {
System.out.println("addBitcoinServer - walletData returns null");
return null;
}
BitcoinServer btcServer = null;
Storable storable = otapi.CreateObject(StoredObjectType.STORED_OBJ_BITCOIN_SERVER);
if (storable != null) {
btcServer = BitcoinServer.ot_dynamic_cast(storable);
if (btcServer != null) {
btcServer.setServer_host(host);
btcServer.setBitcoin_password(pwd);
btcServer.setBitcoin_username(user);
btcServer.setServer_port(port);
btcServer.setGui_label(label);
btcServer.setServer_id(serverID);
btcServer.setServer_type("Bitcoin");
boolean status = walletData.AddBitcoinServer(btcServer);
System.out.println("status walletData.AddBitcoinServer:" + status);
status = otapi.StoreObject(walletData, "moneychanger", "gui_wallet.dat");
System.out.println("status otapi.StoreObject:" + status);
System.out.println("addBitcoinServer - serverID:" + serverID);