improve initial experience

This commit is contained in:
Sofía Aritz 2024-06-30 18:52:10 +02:00
parent 7b5f0e98c8
commit b3dec297df
Signed by: sofia
GPG key ID: 90B5116E3542B28F

View file

@ -19,8 +19,21 @@ import assert from "node:assert";
import app from "./app.js"; import app from "./app.js";
import { ASSET_API_ENDPOINT, ASSET_API_M2M_REFRESH_INTERVAL } from "./consts.js"; import { ASSET_API_ENDPOINT, ASSET_API_M2M_REFRESH_INTERVAL } from "./consts.js";
let assetPubKey = await fetchAssetPubkey(); let assetPubKey;
let assetAlgorithm = await fetchAssetAlgorithm(); try {
assetPubKey = await fetchAssetPubkey();
} catch (e) {
console.error("Couldn't retrieve the pubkey from the asset-api. Is the asset-api server running?")
process.exit(1);
}
let assetAlgorithm;
try {
assetAlgorithm = await fetchAssetAlgorithm();
} catch (e) {
console.error("Couldn't retrieve the algorithm from the asset-api. Is the asset-api server running?")
process.exit(1);
}
setInterval(async () => { setInterval(async () => {
try { try {