From 5a63df0f50b4301aa9d61afffb60691f14104c26 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 7 Jul 2023 09:10:10 -0400 Subject: [PATCH] fix: add typecasts --- src/lib/seed.ts | 2 +- src/modules/app.ts | 5 ++++- src/modules/plugin.ts | 4 +++- src/modules/relay.ts | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/lib/seed.ts b/src/lib/seed.ts index 1de0f7c..4429735 100644 --- a/src/lib/seed.ts +++ b/src/lib/seed.ts @@ -8,7 +8,7 @@ import b4a from "b4a"; const BIP44_PATH = "m/44'/1627'/0'/0'/0'"; export function getSeed() { - const seed = config.str("core.seed"); + const seed = config.str("core.seed") as string; let valid = bip39.validateMnemonic(seed, wordlist); if (!valid) { diff --git a/src/modules/app.ts b/src/modules/app.ts index 8f7ee8c..ed24b17 100644 --- a/src/modules/app.ts +++ b/src/modules/app.ts @@ -20,7 +20,10 @@ export async function start() { await getPluginAPI().emitAsync("core.appServer.buildRoutes"); - await app.listen({ port: config.uint("core.appPort"), host: "0.0.0.0" }); + await app.listen({ + port: config.uint("core.appPort") as number, + host: "0.0.0.0", + }); getPluginAPI().emit("core.appServer.started"); } diff --git a/src/modules/plugin.ts b/src/modules/plugin.ts index 6c8c2ee..6a15e64 100644 --- a/src/modules/plugin.ts +++ b/src/modules/plugin.ts @@ -250,7 +250,9 @@ export async function loadPlugins() { await apiManager.loadPluginInstance(plugin); } - for (const plugin of [...new Set(config.array("core.plugins", []))] as []) { + for (const plugin of [ + ...new Set(config.array("core.plugins", [] as any)), + ] as []) { await apiManager.loadPlugin(plugin); } diff --git a/src/modules/relay.ts b/src/modules/relay.ts index 4226e1d..cb76122 100644 --- a/src/modules/relay.ts +++ b/src/modules/relay.ts @@ -32,7 +32,7 @@ export async function start() { let port = config.uint("core.relayPort"); if (!port) { - port = config.uint("core.port"); + port = config.uint("core.port") as number; } await relayServer.listen({ port, host: "0.0.0.0" });