Skip to content

Commit

Permalink
Namecoin: Display subdomains in DNS editor
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Dec 1, 2019
1 parent 8693875 commit 505ec72
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions electrum_nmc/electrum/gui/qt/configure_dns_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *

from electrum.names import get_domain_records

from .forms.dnsdialog import Ui_DNSDialog

dialogs = [] # Otherwise python randomly garbage collects the dialogs...
Expand Down Expand Up @@ -57,6 +59,12 @@ def __init__(self, value, parent):
self.base_domain = "(...).bit"
else:
raise Exception("Identifier '" + identifier + "' is not d/ or dd/")
subdomains = [self.base_domain]
self.ui.comboDomain.addItems(subdomains)

subdomains = set([self.base_domain])

records, self.extra_records = get_domain_records(self.base_domain, value)

subdomains.update([record[0] for record in records])

self.ui.comboDomain.addItems(list(subdomains))

0 comments on commit 505ec72

Please sign in to comment.