fix: add typecasts

This commit is contained in:
Derrick Hammer 2023-07-07 09:10:10 -04:00
parent 641db83b42
commit 5a63df0f50
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
4 changed files with 9 additions and 4 deletions

View File

@ -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) {

View File

@ -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");
}

View File

@ -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);
}

View File

@ -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" });