forked from tornadocash/classic-ui
Update relayer version checks
This commit is contained in:
parent
c4b5f69b72
commit
50d917a33e
@ -245,23 +245,13 @@ export const actions = {
|
|||||||
const getIsUpdated = () => {
|
const getIsUpdated = () => {
|
||||||
const relayerVersion = response.data.version
|
const relayerVersion = response.data.version
|
||||||
|
|
||||||
if (relayerVersion === '5.0.0') {
|
const { major, prerelease } = parseSemanticVersion(relayerVersion)
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
const requiredMajor = hasEnabledLightProxy ? '5' : '4'
|
const minimalMajorVersion = 5
|
||||||
const { major, patch, prerelease } = parseSemanticVersion(relayerVersion)
|
const isMajorVersionUpdated = Number(major) >= minimalMajorVersion
|
||||||
|
if (prerelease && Number(major) === 5 && hasEnabledLightProxy) return false
|
||||||
|
|
||||||
const isUpdatedMajor = major === requiredMajor
|
return isMajorVersionUpdated
|
||||||
|
|
||||||
if (isUpdatedMajor && prerelease) {
|
|
||||||
const minimalBeta = 11
|
|
||||||
const [betaVersion] = prerelease.split('.').slice(-1)
|
|
||||||
return Number(betaVersion) >= minimalBeta
|
|
||||||
}
|
|
||||||
|
|
||||||
const minimalPatch = 4
|
|
||||||
return isUpdatedMajor && Number(patch) >= minimalPatch
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!getIsUpdated()) {
|
if (!getIsUpdated()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user