Skip to content

Commit faa46fb

Browse files
Work on Nostr app
1 parent a76d2b7 commit faa46fb

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

internal_filesystem/apps/com.micropythonos.nostr/META-INF/MANIFEST.JSON

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"category": "communication",
1111
"activities": [
1212
{
13-
"entrypoint": "assets/nostr.py",
14-
"classname": "Nostr",
13+
"entrypoint": "assets/nostr_app.py",
14+
"classname": "NostrApp",
1515
"intent_filters": [
1616
{
1717
"action": "main",

internal_filesystem/apps/com.micropythonos.nostr/assets/nostr.py renamed to internal_filesystem/apps/com.micropythonos.nostr/assets/nostr_app.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from fullscreen_qr import FullscreenQR
77

8-
class Nostr(Activity):
8+
class NostrApp(Activity):
99

1010
wallet = None
1111
receive_qr_data = None
@@ -104,11 +104,11 @@ def went_online(self):
104104
return
105105
try:
106106
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")
109109
self.redraw_static_receive_code_cb()
110110
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}")
112112
import sys
113113
sys.print_exception(e)
114114
return
@@ -194,11 +194,9 @@ def settings_button_tap(self, event):
194194
intent = Intent(activity_class=SettingsActivity)
195195
intent.putExtra("prefs", self.prefs)
196196
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},
202200
])
203201
self.startActivity(intent)
204202

Binary file not shown.

internal_filesystem/lib/mpos/ui/display.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# Black text on transparent logo works (for light mode) but can't be inverted (for dark mode)
1212
# Even when trying different blend modes (SUBTRACTIVE, ADDITIVE, MULTIPLY)
1313
# Even when it's on a white (instead of transparent) background
14-
#logo_black = "M:builtin/res/mipmap-mdpi/MicroPythonOS_logo_black_240x35.png"
1514
#logo_black = "M:builtin/res/mipmap-mdpi/MicroPythonOS-logo-black-long-w240.png"
1615

1716
def init_rootscreen():

0 commit comments

Comments
 (0)