|
5 | 5 |
|
6 | 6 | from fullscreen_qr import FullscreenQR |
7 | 7 |
|
8 | | -class Nostr(Activity): |
| 8 | +class NostrApp(Activity): |
9 | 9 |
|
10 | 10 | wallet = None |
11 | 11 | receive_qr_data = None |
@@ -104,11 +104,11 @@ def went_online(self): |
104 | 104 | return |
105 | 105 | try: |
106 | 106 | from nostr_client import NostrClient |
107 | | - self.wallet = NostrClient(self.prefs.get_string("nwc_url")) |
108 | | - self.wallet.static_receive_code = self.prefs.get_string("nwc_static_receive_code") |
| 107 | + self.wallet = NostrClient(self.prefs.get_string("nostr_nsec")) |
| 108 | + self.wallet.follow_npub = self.prefs.get_string("nostr_follow_npub") |
109 | 109 | self.redraw_static_receive_code_cb() |
110 | 110 | except Exception as e: |
111 | | - self.error_cb(f"Couldn't initialize NWC Wallet because: {e}") |
| 111 | + self.error_cb(f"Couldn't initialize Nostr client because: {e}") |
112 | 112 | import sys |
113 | 113 | sys.print_exception(e) |
114 | 114 | return |
@@ -194,11 +194,9 @@ def settings_button_tap(self, event): |
194 | 194 | intent = Intent(activity_class=SettingsActivity) |
195 | 195 | intent.putExtra("prefs", self.prefs) |
196 | 196 | intent.putExtra("settings", [ |
197 | | - {"title": "LNBits URL", "key": "lnbits_url", "placeholder": "https://demo.lnpiggy.com", "should_show": self.should_show_setting}, |
198 | | - {"title": "LNBits Read Key", "key": "lnbits_readkey", "placeholder": "fd92e3f8168ba314dc22e54182784045", "should_show": self.should_show_setting}, |
199 | | - {"title": "Optional LN Address", "key": "lnbits_static_receive_code", "placeholder": "Will be fetched if empty.", "should_show": self.should_show_setting}, |
200 | | - {"title": "Nost Wallet Connect", "key": "nwc_url", "placeholder": "nostr+walletconnect://69effe7b...", "should_show": self.should_show_setting}, |
201 | | - {"title": "Optional LN Address", "key": "nwc_static_receive_code", "placeholder": "Optional if present in NWC URL.", "should_show": self.should_show_setting}, |
| 197 | + {"title": "Nostr Private Key (nsec)", "key": "nostr_nsec", "placeholder": "nsec1...", "should_show": self.should_show_setting}, |
| 198 | + {"title": "Nostr Follow Public Key (npub)", "key": "nostr_follow_npub", "placeholder": "npub1...", "should_show": self.should_show_setting}, |
| 199 | + {"title": "Nostr Relay", "key": "nostr_relay", "placeholder": "wss://relay.example.com", "should_show": self.should_show_setting}, |
202 | 200 | ]) |
203 | 201 | self.startActivity(intent) |
204 | 202 |
|
|
0 commit comments