mirror of
https://github.com/feather-wallet/feather.git
synced 2025-02-02 03:06:34 +00:00
Nodes: don't append http:// on add custom node
This commit is contained in:
parent
c9775affd2
commit
3288b85071
1 changed files with 5 additions and 4 deletions
|
@ -135,8 +135,9 @@ void NodeWidget::onCustomAddClicked(){
|
|||
auto currentNodes = m_ctx->nodes->customNodes();
|
||||
QString currentNodesText;
|
||||
|
||||
for (auto &entry: currentNodes)
|
||||
currentNodesText += QString("%1\n").arg(entry.url.toString());
|
||||
for (auto &entry: currentNodes) {
|
||||
currentNodesText += QString("%1\n").arg(entry.toFullAddress());
|
||||
}
|
||||
|
||||
bool ok;
|
||||
QString text = QInputDialog::getMultiLineText(this, "Add custom node(s).", "E.g: user:password@127.0.0.1:18081", currentNodesText, &ok);
|
||||
|
@ -145,9 +146,9 @@ void NodeWidget::onCustomAddClicked(){
|
|||
|
||||
QList<FeatherNode> nodesList;
|
||||
auto newNodesList = text.split("\n");
|
||||
for(auto &newNodeText: newNodesList) {
|
||||
for (auto &newNodeText: newNodesList) {
|
||||
newNodeText = newNodeText.replace("\r", "").trimmed();
|
||||
if(newNodeText.isEmpty())
|
||||
if (newNodeText.isEmpty())
|
||||
continue;
|
||||
|
||||
auto node = FeatherNode(newNodeText);
|
||||
|
|
Loading…
Reference in a new issue