add nostr, and nostr_relays in config
This commit is contained in:
@@ -8,6 +8,7 @@ certifi
|
||||
attrs>=20.1.0
|
||||
jsonpatch
|
||||
electrum_ecc
|
||||
electrum_aionostr>=0.0.6
|
||||
|
||||
# Note that we also need the dnspython[DNSSEC] extra which pulls in cryptography,
|
||||
# but as that is not pure-python it cannot be listed in this file!
|
||||
|
||||
@@ -194,6 +194,13 @@ class SettingsDialog(QDialog, QtEventListener):
|
||||
self.set_alias_color()
|
||||
self.alias_e.editingFinished.connect(self.on_alias_edit)
|
||||
|
||||
nostr_relays_label = HelpLabel.from_configvar(self.config.cv.NOSTR_RELAYS)
|
||||
nostr_relays = self.config.NOSTR_RELAYS
|
||||
self.nostr_relays_e = QLineEdit(nostr_relays)
|
||||
def on_nostr_edit():
|
||||
self.config.NOSTR_RELAYS = str(self.nostr_relays_e.text())
|
||||
self.nostr_relays_e.editingFinished.connect(on_nostr_edit)
|
||||
|
||||
msat_cb = checkbox_from_configvar(self.config.cv.BTC_AMOUNTS_PREC_POST_SAT)
|
||||
msat_cb.setChecked(self.config.BTC_AMOUNTS_PREC_POST_SAT > 0)
|
||||
def on_msat_checked(_x):
|
||||
@@ -392,6 +399,7 @@ class SettingsDialog(QDialog, QtEventListener):
|
||||
misc_widgets = []
|
||||
misc_widgets.append((updatecheck_cb, None))
|
||||
misc_widgets.append((filelogging_cb, None))
|
||||
misc_widgets.append((nostr_relays_label, self.nostr_relays_e))
|
||||
misc_widgets.append((alias_label, self.alias_e))
|
||||
misc_widgets.append((qr_label, qr_combo))
|
||||
|
||||
|
||||
@@ -1207,6 +1207,18 @@ Warning: setting this to too low will result in lots of payment failures."""),
|
||||
SWAPSERVER_FEE_MILLIONTHS = ConfigVar('swapserver_fee_millionths', default=5000, type_=int)
|
||||
TEST_SWAPSERVER_REFUND = ConfigVar('test_swapserver_refund', default=False, type_=bool)
|
||||
|
||||
# nostr
|
||||
NOSTR_RELAYS = ConfigVar(
|
||||
'nostr_relays',
|
||||
default='wss://relay.damus.io,wss://brb.io,wss://nostr.mom',
|
||||
type_=str,
|
||||
short_desc=lambda: _("Nostr relays"),
|
||||
long_desc=lambda: ' '.join([
|
||||
_('Nostr relays are used to send and receive submarine swap offers'),
|
||||
_('If this list is empty, Electrum will use http instead'),
|
||||
]),
|
||||
)
|
||||
|
||||
# zeroconf channels
|
||||
ACCEPT_ZEROCONF_CHANNELS = ConfigVar('accept_zeroconf_channels', default=False, type_=bool)
|
||||
ZEROCONF_TRUSTED_NODE = ConfigVar('zeroconf_trusted_node', default='', type_=str)
|
||||
|
||||
Reference in New Issue
Block a user