Fix software versions comparison, now, if version higher than latest on git, no error thrown
This commit is contained in:
parent
8527be370c
commit
0c33fcd54d
@ -127,7 +127,7 @@ export class HealthService {
|
|||||||
const lastVersion =
|
const lastVersion =
|
||||||
(await fetch('https://api.github.com/repos/tornadocash/tornado-relayer/releases').then((res) => res.json()))[0]?.tag_name ||
|
(await fetch('https://api.github.com/repos/tornadocash/tornado-relayer/releases').then((res) => res.json()))[0]?.tag_name ||
|
||||||
this.config.version;
|
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({
|
||||||
type: 'VERSION_UPDATE_WARN',
|
type: 'VERSION_UPDATE_WARN',
|
||||||
|
Loading…
Reference in New Issue
Block a user