fix: add typecasts
This commit is contained in:
parent
641db83b42
commit
5a63df0f50
|
@ -8,7 +8,7 @@ import b4a from "b4a";
|
||||||
const BIP44_PATH = "m/44'/1627'/0'/0'/0'";
|
const BIP44_PATH = "m/44'/1627'/0'/0'/0'";
|
||||||
|
|
||||||
export function getSeed() {
|
export function getSeed() {
|
||||||
const seed = config.str("core.seed");
|
const seed = config.str("core.seed") as string;
|
||||||
|
|
||||||
let valid = bip39.validateMnemonic(seed, wordlist);
|
let valid = bip39.validateMnemonic(seed, wordlist);
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
|
|
|
@ -20,7 +20,10 @@ export async function start() {
|
||||||
|
|
||||||
await getPluginAPI().emitAsync("core.appServer.buildRoutes");
|
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");
|
getPluginAPI().emit("core.appServer.started");
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,7 +250,9 @@ export async function loadPlugins() {
|
||||||
await apiManager.loadPluginInstance(plugin);
|
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);
|
await apiManager.loadPlugin(plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ export async function start() {
|
||||||
let port = config.uint("core.relayPort");
|
let port = config.uint("core.relayPort");
|
||||||
|
|
||||||
if (!port) {
|
if (!port) {
|
||||||
port = config.uint("core.port");
|
port = config.uint("core.port") as number;
|
||||||
}
|
}
|
||||||
|
|
||||||
await relayServer.listen({ port, host: "0.0.0.0" });
|
await relayServer.listen({ port, host: "0.0.0.0" });
|
||||||
|
|
Loading…
Reference in New Issue