From 7a9552f5f11688c06d27636b27814597f4ef82db Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Sat, 16 Nov 2019 20:45:13 -0800 Subject: [PATCH] Allow custom servers --- src/mainwindow.cpp | 10 +++++++--- src/settings.ui | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index a85f692..d03ef72 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -442,9 +442,13 @@ void MainWindow::setupSettingsModal() { if (reloadConnection) { // Save settings Settings::getInstance()->saveSettings(settings.cmbServer->currentText()); - - auto cl = new ConnectionLoader(this, rpc); - cl->loadConnection(); + + // Save the wallet + getRPC()->saveWallet([=] (auto) { + // Then reload the connection + auto cl = new ConnectionLoader(this, rpc); + cl->loadConnection(); + }); } } }); diff --git a/src/settings.ui b/src/settings.ui index 4c031c4..ae44092 100644 --- a/src/settings.ui +++ b/src/settings.ui @@ -46,7 +46,7 @@ - Server + Lightwallet Server