This commit is contained in:
Arc 2024-11-19 23:03:41 +00:00
commit b24224a7e5
3 changed files with 11 additions and 7 deletions

View file

@ -1,8 +1,6 @@
import secp256k1
async def m001_initial(db):
"""
Initial tables
@ -70,13 +68,15 @@ async def m003_default_config(db):
"""
await db.execute(
"""
INSERT OR REPLACE INTO nwcprovider.config (key, value) VALUES ('relay', 'nostrclient');
INSERT OR REPLACE INTO nwcprovider.config
(key, value) VALUES ('relay', 'nostrclient');
"""
)
new_private_key = bytes.hex(secp256k1._gen_private_key())
await db.execute(
"""
INSERT OR REPLACE INTO nwcprovider.config (key, value) VALUES ('provider_key', :provider_key);
INSERT OR REPLACE INTO nwcprovider.config
(key, value) VALUES ('provider_key', :provider_key);
""",
{"provider_key": new_private_key},
)
@ -89,9 +89,10 @@ async def m004_default_config2(db):
await db.execute(
"""
INSERT OR REPLACE INTO nwcprovider.config (key, value) VALUES ('relay_alias', :value);
INSERT OR REPLACE INTO nwcprovider.config
(key, value) VALUES ('relay_alias', :value);
""",
{"value":""},
{"value": ""},
)