improve initial experience
This commit is contained in:
parent
7b5f0e98c8
commit
b3dec297df
1 changed files with 15 additions and 2 deletions
|
@ -19,8 +19,21 @@ import assert from "node:assert";
|
|||
import app from "./app.js";
|
||||
import { ASSET_API_ENDPOINT, ASSET_API_M2M_REFRESH_INTERVAL } from "./consts.js";
|
||||
|
||||
let assetPubKey = await fetchAssetPubkey();
|
||||
let assetAlgorithm = await fetchAssetAlgorithm();
|
||||
let assetPubKey;
|
||||
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 () => {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue