check version fallback
This commit is contained in:
parent
72f0e8399d
commit
9231f3f8ec
@ -124,9 +124,9 @@ export class HealthService {
|
|||||||
|
|
||||||
async checkUpdate() {
|
async checkUpdate() {
|
||||||
console.log('Checking version...');
|
console.log('Checking version...');
|
||||||
const lastVersion = (
|
const lastVersion =
|
||||||
await fetch('https://api.github.com/repos/tornadocash/tornado-relayer/releases').then((res) => res.json())
|
(await fetch('https://api.github.com/repos/tornadocash/tornado-relayer/releases').then((res) => res.json()))[0]?.tag_name ||
|
||||||
)[0]?.tag_name;
|
this.config.version;
|
||||||
const isUpToDate = compareVersions(this.config.version, lastVersion) === 0;
|
const isUpToDate = compareVersions(this.config.version, lastVersion) === 0;
|
||||||
if (!isUpToDate) {
|
if (!isUpToDate) {
|
||||||
await this.pushAlert({
|
await this.pushAlert({
|
||||||
|
Loading…
Reference in New Issue
Block a user