Skip to content

Commit

Permalink
improve init
Browse files Browse the repository at this point in the history
  • Loading branch information
trbouma committed Sep 30, 2024
1 parent 8fc5784 commit a291f9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions safebox/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"wss://relay.primal.net",
"wss://nos.lol"
]
mints = ["https://mint.belgianbitcoinembassy.org"]
mints = ["https://mint.nimo.cash"]
wallet = "default"
home_relay = "wss://relay.magiccity.live"
home_relay = "wss://strfry.openbalance.app"
replicate_relays = ["wss://relay.nimo.cash", "wss://nostr-pub.wellorder.net"]

home_directory = os.path.expanduser('~')
Expand Down Expand Up @@ -77,14 +77,16 @@ def info(ctx):
@click.option("--profile","-p", is_flag=True, show_default=True, default=False, help="Publish Nostr profile.")
@click.option("--keepkey","-k", is_flag=True, show_default=True, default=False, help="Keep existing key(nsec).")
def init(profile, keepkey):
click.echo(f"Creating a new safebox with {MINTS}")
click.echo(f"Creating a new safebox with relay: {HOME_RELAY} and mint: {MINTS}")

wallet_obj = Wallet(nsec=NSEC, relays=RELAYS, mints=MINTS, home_relay=HOME_RELAY)
if profile:
click.echo("Create nostr profile")
if keepkey:
click.echo("Keep existing key")
config_obj['nsec'] = wallet_obj.create_profile(profile,keepkey)
click.echo(f"nsec: {config_obj['nsec']}")

click.echo(wallet_obj.get_profile())
write_config()
click.echo(wallet_obj.get_post())

Expand Down
2 changes: 1 addition & 1 deletion safebox/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def create_profile(self, nostr_profile_create: bool=False, keepkey:bool=False):
self.privkey_hex = self.k.private_key_hex()

new_name = generate()
print(new_name)
# print(new_name)
for i in range(len(new_name)):
if new_name[i].lower() in ["of","from"]:
if i >=1:
Expand Down

0 comments on commit a291f9b

Please sign in to comment.