This commit is contained in:
Nicola Benaglia 2025-06-18 23:45:02 +02:00
parent 233e6179d5
commit a054a9b612
11 changed files with 148 additions and 115 deletions

View File

@ -2370,11 +2370,7 @@ function App() {
count: requestBuyOrder?.crosschainAtInfo?.length || 0, count: requestBuyOrder?.crosschainAtInfo?.length || 0,
}} }}
tOptions={{ postProcess: ['capitalizeFirstChar'] }} tOptions={{ postProcess: ['capitalizeFirstChar'] }}
> ></Trans>
The Application <br />
<italic>{{ hostname }}</italic> <br />
<span>is requesting {{ count }} buy order</span>
</Trans>
</TextP> </TextP>
<Spacer height="10px" /> <Spacer height="10px" />
@ -2481,11 +2477,7 @@ function App() {
count: requestBuyOrder?.crosschainAtInfo?.length || 0, count: requestBuyOrder?.crosschainAtInfo?.length || 0,
}} }}
tOptions={{ postProcess: ['capitalizeFirstChar'] }} tOptions={{ postProcess: ['capitalizeFirstChar'] }}
> ></Trans>
The Application <br />
<italic>{{ hostname }}</italic> <br />
<span>is requesting {{ count }} a payment</span>
</Trans>
</TextP> </TextP>
<Spacer height="10px" /> <Spacer height="10px" />
@ -2964,10 +2956,7 @@ function App() {
), ),
}} }}
tOptions={{ postProcess: ['capitalizeFirstChar'] }} tOptions={{ postProcess: ['capitalizeFirstChar'] }}
> ></Trans>
A <seed>SEEDPHRASE</seed> has been randomly generated in
the background.
</Trans>
</Typography> </Typography>
<Typography <Typography
@ -3001,10 +2990,7 @@ function App() {
), ),
}} }}
tOptions={{ postProcess: ['capitalizeFirstChar'] }} tOptions={{ postProcess: ['capitalizeFirstChar'] }}
> ></Trans>
Create your Qortal account by clicking <next>NEXT</next>{' '}
below.
</Trans>
</Typography> </Typography>
<Spacer height="17px" /> <Spacer height="17px" />

View File

@ -40,13 +40,16 @@ import { FidgetSpinner } from 'react-loader-spinner';
import { useModal } from '../../hooks/useModal.tsx'; import { useModal } from '../../hooks/useModal.tsx';
import { useAtom, useSetAtom } from 'jotai'; import { useAtom, useSetAtom } from 'jotai';
import { memberGroupsAtom, txListAtom } from '../../atoms/global'; import { memberGroupsAtom, txListAtom } from '../../atoms/global';
import { useTranslation } from 'react-i18next'; import { Trans, useTranslation } from 'react-i18next';
import { TransitionUp } from '../../common/Transitions.tsx'; import { TransitionUp } from '../../common/Transitions.tsx';
import { import {
nextLevel,
averageBlockDay, averageBlockDay,
averageBlockTime, averageBlockTime,
dayReward, dayReward,
levelUpBlocks, levelUpBlocks,
levelUpDays,
mintingStatus,
} from './MintingStats.tsx'; } from './MintingStats.tsx';
export const Minting = ({ setIsOpenMinting, myAddress, show }) => { export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
@ -166,6 +169,13 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
} }
}; };
const daysToNextLevel = levelUpDays(
accountInfo,
adminInfo,
nodeHeightBlock,
nodeStatus
);
const refreshRewardShare = () => { const refreshRewardShare = () => {
if (!myAddress) return; if (!myAddress) return;
getRewardShares(myAddress); getRewardShares(myAddress);
@ -673,7 +683,10 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
</Typography> </Typography>
<Grid container spacing={2}> <Grid container spacing={2}>
<StatCard label="Current Status" value="(Minting)" /> <StatCard
label="Current Status"
value={mintingStatus(nodeStatus)}
/>
<StatCard <StatCard
label="Current Level" label="Current Level"
value={accountInfo?.level} value={accountInfo?.level}
@ -685,10 +698,22 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
</Grid> </Grid>
<Box mt={2} textAlign="center"> <Box mt={2} textAlign="center">
<Typography sx={{ textAlign: 'center' }}> <Paper elevation={5}>
With a 24/7 Minting you will reach level 5 in{' '} <Typography sx={{ textAlign: 'center' }}>
<strong>117.58 days</strong>! <Trans
</Typography> i18nKey="message.generic.minting_next_level"
ns="core"
components={{
strong: <strong />,
}}
values={{
level: nextLevel(accountInfo?.level),
count: daysToNextLevel?.toFixed(2),
}}
tOptions={{ postProcess: ['capitalizeFirstChar'] }}
></Trans>
</Typography>
</Paper>
</Box> </Box>
</Paper> </Paper>

View File

@ -1,3 +1,5 @@
import i18n from '../../i18n/i18n';
const accountTargetBlocks = (level: number): number | undefined => { const accountTargetBlocks = (level: number): number | undefined => {
if (level === 0) { if (level === 0) {
return 7200; return 7200;
@ -24,7 +26,7 @@ const accountTargetBlocks = (level: number): number | undefined => {
} }
}; };
export const accountLevel = (level: number): number | undefined => { export const nextLevel = (level: number): number | undefined => {
if (level === 0) { if (level === 0) {
return 1; return 1;
} else if (level === 1) { } else if (level === 1) {
@ -80,62 +82,62 @@ export const blockReward = (nodeStatus): number => {
} }
}; };
export const currentTier = (addressInfo): string | undefined => { export const currentTier = (accountInfo): string | undefined => {
if (addressInfo.level === 0) { if (accountInfo.level === 0) {
return 'Tier 0 (Level 0)'; return 'Tier 0 (Level 0)';
} else if (addressInfo.level === 1 || addressInfo.level === 2) { } else if (accountInfo.level === 1 || accountInfo.level === 2) {
return 'Tier 1 (Level 1 + 2)'; return 'Tier 1 (Level 1 + 2)';
} else if (addressInfo.level === 3 || addressInfo.level === 4) { } else if (accountInfo.level === 3 || accountInfo.level === 4) {
return 'Tier 2 (Level 3 + 4)'; return 'Tier 2 (Level 3 + 4)';
} else if (addressInfo.level === 5 || addressInfo.level === 6) { } else if (accountInfo.level === 5 || accountInfo.level === 6) {
return 'Tier 3 (Level 5 + 6)'; return 'Tier 3 (Level 5 + 6)';
} else if (addressInfo.level === 7 || addressInfo.level === 8) { } else if (accountInfo.level === 7 || accountInfo.level === 8) {
return 'Tier 4 (Level 7 + 8)'; return 'Tier 4 (Level 7 + 8)';
} else if (addressInfo.level === 9 || addressInfo.level === 10) { } else if (accountInfo.level === 9 || accountInfo.level === 10) {
return 'Tier 5 (Level 9 + 10)'; return 'Tier 5 (Level 9 + 10)';
} else { } else {
return undefined; // fallback: should never reach this point return undefined; // fallback: should never reach this point
} }
}; };
export const tierPercent = (addressInfo, tier4Online): number | undefined => { export const tierPercent = (accountInfo, tier4Online): number | undefined => {
if (addressInfo.level === 0) { if (accountInfo.level === 0) {
return 0; return 0;
} else if (addressInfo.level === 1) { } else if (accountInfo.level === 1) {
return 6; return 6;
} else if (addressInfo.level === 2) { } else if (accountInfo.level === 2) {
return 6; return 6;
} else if (addressInfo.level === 3) { } else if (accountInfo.level === 3) {
return 13; return 13;
} else if (addressInfo.level === 4) { } else if (accountInfo.level === 4) {
return 1; return 1;
} else if (addressInfo.level === 5) { } else if (accountInfo.level === 5) {
if (tier4Online < 30) { if (tier4Online < 30) {
return 45; return 45;
} else { } else {
return 19; return 19;
} }
} else if (addressInfo.level === 6) { } else if (accountInfo.level === 6) {
if (tier4Online < 30) { if (tier4Online < 30) {
return 45; return 45;
} else { } else {
return 19; return 19;
} }
} else if (addressInfo.level === 7) { } else if (accountInfo.level === 7) {
if (tier4Online < 30) { if (tier4Online < 30) {
return 45; return 45;
} else { } else {
return 26; return 26;
} }
} else if (addressInfo.level === 8) { } else if (accountInfo.level === 8) {
if (tier4Online < 30) { if (tier4Online < 30) {
return 45; return 45;
} else { } else {
return 26; return 26;
} }
} else if (addressInfo.level === 9) { } else if (accountInfo.level === 9) {
return 32; return 32;
} else if (addressInfo.level === 10) { } else if (accountInfo.level === 10) {
return 32; return 32;
} else { } else {
return undefined; return undefined;
@ -143,22 +145,22 @@ export const tierPercent = (addressInfo, tier4Online): number | undefined => {
}; };
// _countLevels() { // _countLevels() {
// if (this.addressInfo.level === 0) { // if (this.accountInfo.level === 0) {
// let countTier0 = (this.addressLevel[0].count).toString() // let countTier0 = (this.addressLevel[0].count).toString()
// return '' + countTier0 // return '' + countTier0
// } else if (this.addressInfo.level === 1) { // } else if (this.accountInfo.level === 1) {
// let countTier10 = (this.addressLevel[1].count + this.addressLevel[2].count).toString() // let countTier10 = (this.addressLevel[1].count + this.addressLevel[2].count).toString()
// return '' + countTier10 // return '' + countTier10
// } else if (this.addressInfo.level === 2) { // } else if (this.accountInfo.level === 2) {
// let countTier11 = (this.addressLevel[1].count + this.addressLevel[2].count).toString() // let countTier11 = (this.addressLevel[1].count + this.addressLevel[2].count).toString()
// return '' + countTier11 // return '' + countTier11
// } else if (this.addressInfo.level === 3) { // } else if (this.accountInfo.level === 3) {
// let countTier20 = (this.addressLevel[3].count + this.addressLevel[4].count).toString() // let countTier20 = (this.addressLevel[3].count + this.addressLevel[4].count).toString()
// return '' + countTier20 // return '' + countTier20
// } else if (this.addressInfo.level === 4) { // } else if (this.accountInfo.level === 4) {
// let countTier21 = (this.addressLevel[3].count + this.addressLevel[4].count).toString() // let countTier21 = (this.addressLevel[3].count + this.addressLevel[4].count).toString()
// return '' + countTier21 // return '' + countTier21
// } else if (this.addressInfo.level === 5) { // } else if (this.accountInfo.level === 5) {
// if (this.tier4Online < 30) { // if (this.tier4Online < 30) {
// let countTier30 = (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count).toString() // let countTier30 = (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count).toString()
// return '' + countTier30 // return '' + countTier30
@ -166,7 +168,7 @@ export const tierPercent = (addressInfo, tier4Online): number | undefined => {
// let countTier30 = (this.addressLevel[5].count + this.addressLevel[6].count).toString() // let countTier30 = (this.addressLevel[5].count + this.addressLevel[6].count).toString()
// return '' + countTier30 // return '' + countTier30
// } // }
// } else if (this.addressInfo.level === 6) { // } else if (this.accountInfo.level === 6) {
// if (this.tier4Online < 30) { // if (this.tier4Online < 30) {
// let countTier31 = (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count).toString() // let countTier31 = (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count).toString()
// return '' + countTier31 // return '' + countTier31
@ -174,7 +176,7 @@ export const tierPercent = (addressInfo, tier4Online): number | undefined => {
// let countTier31 = (this.addressLevel[5].count + this.addressLevel[6].count).toString() // let countTier31 = (this.addressLevel[5].count + this.addressLevel[6].count).toString()
// return '' + countTier31 // return '' + countTier31
// } // }
// } else if (this.addressInfo.level === 7) { // } else if (this.accountInfo.level === 7) {
// if (this.tier4Online < 30) { // if (this.tier4Online < 30) {
// let countTier40 = (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count).toString() // let countTier40 = (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count).toString()
// return '' + countTier40 // return '' + countTier40
@ -182,7 +184,7 @@ export const tierPercent = (addressInfo, tier4Online): number | undefined => {
// let countTier40 = (this.addressLevel[7].count + this.addressLevel[8].count).toString() // let countTier40 = (this.addressLevel[7].count + this.addressLevel[8].count).toString()
// return '' + countTier40 // return '' + countTier40
// } // }
// } else if (this.addressInfo.level === 8) { // } else if (this.accountInfo.level === 8) {
// if (this.tier4Online < 30) { // if (this.tier4Online < 30) {
// let countTier40 = (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count).toString() // let countTier40 = (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count).toString()
// return '' + countTier40 // return '' + countTier40
@ -190,35 +192,35 @@ export const tierPercent = (addressInfo, tier4Online): number | undefined => {
// let countTier41 = (this.addressLevel[7].count + this.addressLevel[8].count).toString() // let countTier41 = (this.addressLevel[7].count + this.addressLevel[8].count).toString()
// return '' + countTier41 // return '' + countTier41
// } // }
// } else if (this.addressInfo.level === 9) { // } else if (this.accountInfo.level === 9) {
// let countTier50 = (this.addressLevel[9].count + this.addressLevel[10].count).toString() // let countTier50 = (this.addressLevel[9].count + this.addressLevel[10].count).toString()
// return '' + countTier50 // return '' + countTier50
// } else if (this.addressInfo.level === 10) { // } else if (this.accountInfo.level === 10) {
// let countTier51 = (this.addressLevel[9].count + this.addressLevel[10].count).toString() // let countTier51 = (this.addressLevel[9].count + this.addressLevel[10].count).toString()
// return '' + countTier51 // return '' + countTier51
// } // }
// } // }
// _countReward() { // _countReward() {
// if (this.addressInfo.level === 0) { // if (this.accountInfo.level === 0) {
// return '0' // return '0'
// } else if (this.addressInfo.level === 1) { // } else if (this.accountInfo.level === 1) {
// let countReward10 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count)).toFixed(8) // let countReward10 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count)).toFixed(8)
// let countReward11 = (countReward10).toString() // let countReward11 = (countReward10).toString()
// return '' + countReward11 // return '' + countReward11
// } else if (this.addressInfo.level === 2) { // } else if (this.accountInfo.level === 2) {
// let countReward20 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count)).toFixed(8) // let countReward20 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count)).toFixed(8)
// let countReward21 = (countReward20).toString() // let countReward21 = (countReward20).toString()
// return '' + countReward21 // return '' + countReward21
// } else if (this.addressInfo.level === 3) { // } else if (this.accountInfo.level === 3) {
// let countReward30 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count)).toFixed(8) // let countReward30 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count)).toFixed(8)
// let countReward31 = (countReward30).toString() // let countReward31 = (countReward30).toString()
// return '' + countReward31 // return '' + countReward31
// } else if (this.addressInfo.level === 4) { // } else if (this.accountInfo.level === 4) {
// let countReward40 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count)).toFixed(8) // let countReward40 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count)).toFixed(8)
// let countReward41 = (countReward40).toString() // let countReward41 = (countReward40).toString()
// return '' + countReward41 // return '' + countReward41
// } else if (this.addressInfo.level === 5) { // } else if (this.accountInfo.level === 5) {
// if (this.tier4Online < 30) { // if (this.tier4Online < 30) {
// let countReward50 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count)).toFixed(8) // let countReward50 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count)).toFixed(8)
// let countReward51 = (countReward50).toString() // let countReward51 = (countReward50).toString()
@ -228,7 +230,7 @@ export const tierPercent = (addressInfo, tier4Online): number | undefined => {
// let countReward51 = (countReward50).toString() // let countReward51 = (countReward50).toString()
// return '' + countReward51 // return '' + countReward51
// } // }
// } else if (this.addressInfo.level === 6) { // } else if (this.accountInfo.level === 6) {
// if (this.tier4Online < 30) { // if (this.tier4Online < 30) {
// let countReward60 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count)).toFixed(8) // let countReward60 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count)).toFixed(8)
// let countReward61 = (countReward60).toString() // let countReward61 = (countReward60).toString()
@ -238,7 +240,7 @@ export const tierPercent = (addressInfo, tier4Online): number | undefined => {
// let countReward61 = (countReward60).toString() // let countReward61 = (countReward60).toString()
// return '' + countReward61 // return '' + countReward61
// } // }
// } else if (this.addressInfo.level === 7) { // } else if (this.accountInfo.level === 7) {
// if (this.tier4Online < 30) { // if (this.tier4Online < 30) {
// let countReward70 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count)).toFixed(8) // let countReward70 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count)).toFixed(8)
// let countReward71 = (countReward70).toString() // let countReward71 = (countReward70).toString()
@ -248,7 +250,7 @@ export const tierPercent = (addressInfo, tier4Online): number | undefined => {
// let countReward71 = (countReward70).toString() // let countReward71 = (countReward70).toString()
// return '' + countReward71 // return '' + countReward71
// } // }
// } else if (this.addressInfo.level === 8) { // } else if (this.accountInfo.level === 8) {
// if (this.tier4Online < 30) { // if (this.tier4Online < 30) {
// let countReward80 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count)).toFixed(8) // let countReward80 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count)).toFixed(8)
// let countReward81 = (countReward80).toString() // let countReward81 = (countReward80).toString()
@ -258,11 +260,11 @@ export const tierPercent = (addressInfo, tier4Online): number | undefined => {
// let countReward81 = (countReward80).toString() // let countReward81 = (countReward80).toString()
// return '' + countReward81 // return '' + countReward81
// } // }
// } else if (this.addressInfo.level === 9) { // } else if (this.accountInfo.level === 9) {
// let countReward90 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[9].count + this.addressLevel[10].count)).toFixed(8) // let countReward90 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[9].count + this.addressLevel[10].count)).toFixed(8)
// let countReward91 = (countReward90).toString() // let countReward91 = (countReward90).toString()
// return '' + countReward91 // return '' + countReward91
// } else if (this.addressInfo.level === 10) { // } else if (this.accountInfo.level === 10) {
// let countReward100 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[9].count + this.addressLevel[10].count)).toFixed(8) // let countReward100 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[9].count + this.addressLevel[10].count)).toFixed(8)
// let countReward101 = (countReward100).toString() // let countReward101 = (countReward100).toString()
// return '' + countReward101 // return '' + countReward101
@ -270,25 +272,25 @@ export const tierPercent = (addressInfo, tier4Online): number | undefined => {
// } // }
// _countRewardDay() { // _countRewardDay() {
// if (this.addressInfo.level === 0) { // if (this.accountInfo.level === 0) {
// return '0' // return '0'
// } else if (this.addressInfo.level === 1) { // } else if (this.accountInfo.level === 1) {
// let countRewardDay10 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count) * this._timeCalc()).toFixed(8) // let countRewardDay10 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count) * this._timeCalc()).toFixed(8)
// let countRewardDay11 = (countRewardDay10).toString() // let countRewardDay11 = (countRewardDay10).toString()
// return '' + countRewardDay11 // return '' + countRewardDay11
// } else if (this.addressInfo.level === 2) { // } else if (this.accountInfo.level === 2) {
// let countRewardDay20 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count) * this._timeCalc()).toFixed(8) // let countRewardDay20 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count) * this._timeCalc()).toFixed(8)
// let countRewardDay21 = (countRewardDay20).toString() // let countRewardDay21 = (countRewardDay20).toString()
// return '' + countRewardDay21 // return '' + countRewardDay21
// } else if (this.addressInfo.level === 3) { // } else if (this.accountInfo.level === 3) {
// let countRewardDay30 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count) * this._timeCalc()).toFixed(8) // let countRewardDay30 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count) * this._timeCalc()).toFixed(8)
// let countRewardDay31 = (countRewardDay30).toString() // let countRewardDay31 = (countRewardDay30).toString()
// return '' + countRewardDay31 // return '' + countRewardDay31
// } else if (this.addressInfo.level === 4) { // } else if (this.accountInfo.level === 4) {
// let countRewardDay40 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count) * this._timeCalc()).toFixed(8) // let countRewardDay40 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count) * this._timeCalc()).toFixed(8)
// let countRewardDay41 = (countRewardDay40).toString() // let countRewardDay41 = (countRewardDay40).toString()
// return '' + countRewardDay41 // return '' + countRewardDay41
// } else if (this.addressInfo.level === 5) { // } else if (this.accountInfo.level === 5) {
// if (this.tier4Online < 30) { // if (this.tier4Online < 30) {
// let countRewardDay50 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count) * this._timeCalc()).toFixed(8) // let countRewardDay50 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count) * this._timeCalc()).toFixed(8)
// let countRewardDay51 = (countRewardDay50).toString() // let countRewardDay51 = (countRewardDay50).toString()
@ -298,7 +300,7 @@ export const tierPercent = (addressInfo, tier4Online): number | undefined => {
// let countRewardDay51 = (countRewardDay50).toString() // let countRewardDay51 = (countRewardDay50).toString()
// return '' + countRewardDay51 // return '' + countRewardDay51
// } // }
// } else if (this.addressInfo.level === 6) { // } else if (this.accountInfo.level === 6) {
// if (this.tier4Online < 30) { // if (this.tier4Online < 30) {
// let countRewardDay60 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count) * this._timeCalc()).toFixed(8) // let countRewardDay60 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count) * this._timeCalc()).toFixed(8)
// let countRewardDay61 = (countRewardDay60).toString() // let countRewardDay61 = (countRewardDay60).toString()
@ -308,7 +310,7 @@ export const tierPercent = (addressInfo, tier4Online): number | undefined => {
// let countRewardDay61 = (countRewardDay60).toString() // let countRewardDay61 = (countRewardDay60).toString()
// return '' + countRewardDay61 // return '' + countRewardDay61
// } // }
// } else if (this.addressInfo.level === 7) { // } else if (this.accountInfo.level === 7) {
// if (this.tier4Online < 30) { // if (this.tier4Online < 30) {
// let countRewardDay70 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count) * this._timeCalc()).toFixed(8) // let countRewardDay70 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count) * this._timeCalc()).toFixed(8)
// let countRewardDay71 = (countRewardDay70).toString() // let countRewardDay71 = (countRewardDay70).toString()
@ -318,7 +320,7 @@ export const tierPercent = (addressInfo, tier4Online): number | undefined => {
// let countRewardDay71 = (countRewardDay70).toString() // let countRewardDay71 = (countRewardDay70).toString()
// return '' + countRewardDay71 // return '' + countRewardDay71
// } // }
// } else if (this.addressInfo.level === 8) { // } else if (this.accountInfo.level === 8) {
// if (this.tier4Online < 30) { // if (this.tier4Online < 30) {
// let countRewardDay80 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count) * this._timeCalc()).toFixed(8) // let countRewardDay80 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count) * this._timeCalc()).toFixed(8)
// let countRewardDay81 = (countRewardDay80).toString() // let countRewardDay81 = (countRewardDay80).toString()
@ -328,47 +330,58 @@ export const tierPercent = (addressInfo, tier4Online): number | undefined => {
// let countRewardDay81 = (countRewardDay80).toString() // let countRewardDay81 = (countRewardDay80).toString()
// return '' + countRewardDay81 // return '' + countRewardDay81
// } // }
// } else if (this.addressInfo.level === 9) { // } else if (this.accountInfo.level === 9) {
// let countRewardDay90 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[9].count + this.addressLevel[10].count) * this._timeCalc()).toFixed(8) // let countRewardDay90 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[9].count + this.addressLevel[10].count) * this._timeCalc()).toFixed(8)
// let countRewardDay91 = (countRewardDay90).toString() // let countRewardDay91 = (countRewardDay90).toString()
// return '' + countRewardDay91 // return '' + countRewardDay91
// } else if (this.addressInfo.level === 10) { // } else if (this.accountInfo.level === 10) {
// let countRewardDay100 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[9].count + this.addressLevel[10].count) * this._timeCalc()).toFixed(8) // let countRewardDay100 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[9].count + this.addressLevel[10].count) * this._timeCalc()).toFixed(8)
// let countRewardDay101 = (countRewardDay100).toString() // let countRewardDay101 = (countRewardDay100).toString()
// return '' + countRewardDay101 // return '' + countRewardDay101
// } // }
// } // }
export const mintingStatus = () => { export const mintingStatus = (nodeStatus): string => {
if ( if (
this.nodeInfo.isMintingPossible === true && nodeStatus.isMintingPossible === true &&
this.nodeInfo.isSynchronizing === true nodeStatus.isSynchronizing === true
) { ) {
this.cssMinting = 'blue'; // this.cssMinting = 'blue';
return html`${translate('appinfo.minting')}`; return i18n.t('core:message.status.minting', {
postProcess: 'capitalizeFirstChar',
});
} else if ( } else if (
this.nodeInfo.isMintingPossible === true && nodeStatus.isMintingPossible === true &&
this.nodeInfo.isSynchronizing === false nodeStatus.isSynchronizing === false
) { ) {
this.cssMinting = 'blue'; // this.cssMinting = 'blue';
return html`${translate('appinfo.minting')}`; return i18n.t('core:message.status.minting', {
postProcess: 'capitalizeFirstChar',
});
} else if ( } else if (
this.nodeInfo.isMintingPossible === false && nodeStatus.isMintingPossible === false &&
this.nodeInfo.isSynchronizing === true nodeStatus.isSynchronizing === true
) { ) {
this.cssMinting = 'red'; // this.cssMinting = 'red';
return html`(${translate('appinfo.synchronizing')}... return i18n.t('core:message.status.synchronizing', {
${this.nodeStatus.syncPercent !== undefined postProcess: 'capitalizeFirstChar',
? this.nodeStatus.syncPercent + '%' }) +
: ''})`; nodeStatus.syncPercent !==
undefined
? nodeStatus.syncPercent + '%'
: '';
} else if ( } else if (
this.nodeInfo.isMintingPossible === false && nodeStatus.isMintingPossible === false &&
this.nodeInfo.isSynchronizing === false nodeStatus.isSynchronizing === false
) { ) {
this.cssMinting = 'red'; // this.cssMinting = 'red';
return html`${translate('mintingpage.mchange9')}`; return i18n.t('core:message.status.not_minting', {
postProcess: 'capitalizeFirstChar',
});
} else { } else {
return 'No Status'; return i18n.t('core:message.status.no_status', {
postProcess: 'capitalizeFirstChar',
});
} }
}; };
@ -404,20 +417,20 @@ export const levelUpDays = (
adminInfo, adminInfo,
nodeHeightBlock, nodeHeightBlock,
nodeStatus nodeStatus
) => { ): number | undefined => {
if ( if (
accountInfo?.blocksMinted === undefined || accountInfo?.blocksMinted === undefined ||
nodeStatus?.height === undefined || nodeStatus?.height === undefined ||
accountTargetBlocks(accountInfo?.level) == undefined accountTargetBlocks(accountInfo?.level) == undefined
) )
return null; return undefined;
const countBlocks = const countBlocks =
accountTargetBlocks(accountInfo?.level)! - accountTargetBlocks(accountInfo?.level)! -
(accountInfo?.blocksMinted + accountInfo?.blocksMintedAdjustment); (accountInfo?.blocksMinted + accountInfo?.blocksMintedAdjustment);
const countDays = countBlocks / averageBlockDay(adminInfo, nodeHeightBlock); const countDays = countBlocks / averageBlockDay(adminInfo, nodeHeightBlock);
return countDays.toFixed(2); return countDays;
}; };
export const dayReward = (adminInfo, nodeHeightBlock, nodeStatus) => { export const dayReward = (adminInfo, nodeHeightBlock, nodeStatus) => {

View File

@ -306,8 +306,9 @@
"status": { "status": {
"minting": "(Prägung)", "minting": "(Prägung)",
"not_minting": "(nicht punktieren)", "not_minting": "(nicht punktieren)",
"no_status": "kein Status",
"synchronized": "synchronisiert", "synchronized": "synchronisiert",
"synchronizing": "Synchronisierung" "synchronizing": "Synchronisierung..."
}, },
"success": { "success": {
"order_submitted": "Ihre Kaufbestellung wurde eingereicht", "order_submitted": "Ihre Kaufbestellung wurde eingereicht",

View File

@ -217,26 +217,27 @@
"already_voted": "you've already voted.", "already_voted": "you've already voted.",
"avatar_size": "{{ size }} KB max. for GIFS", "avatar_size": "{{ size }} KB max. for GIFS",
"benefits_qort": "benefits of having QORT", "benefits_qort": "benefits of having QORT",
"building": "building",
"building_app": "building app", "building_app": "building app",
"confirmed": "confirmed", "building": "building",
"created_by": "created by {{ owner }}",
"buy_order_request": "the Application <br/><italic>{{hostname}}</italic> <br/><span>is requesting {{count}} buy order</span>", "buy_order_request": "the Application <br/><italic>{{hostname}}</italic> <br/><span>is requesting {{count}} buy order</span>",
"buy_order_request_other": "the Application <br/><italic>{{hostname}}</italic> <br/><span>is requesting {{count}} buy orders</span>", "buy_order_request_other": "the Application <br/><italic>{{hostname}}</italic> <br/><span>is requesting {{count}} buy orders</span>",
"confirmed": "confirmed",
"created_by": "created by {{ owner }}",
"devmode_local_node": "please use your local node for dev mode! Logout and use Local node.", "devmode_local_node": "please use your local node for dev mode! Logout and use Local node.",
"downloading": "downloading",
"downloading_decrypting_app": "downloading and decrypting private app.", "downloading_decrypting_app": "downloading and decrypting private app.",
"downloading": "downloading",
"edited": "edited", "edited": "edited",
"editing_message": "editing message", "editing_message": "editing message",
"encrypted": "encrypted",
"encrypted_not": "not encrypted", "encrypted_not": "not encrypted",
"encrypted": "encrypted",
"fee_qort": "fee: {{ message }} QORT", "fee_qort": "fee: {{ message }} QORT",
"fetching_data": "fetching app data", "fetching_data": "fetching app data",
"foreign_fee": "foreign fee: {{ message }}", "foreign_fee": "foreign fee: {{ message }}",
"get_qort_trade_portal": "get QORT using Qortal's crosschain trade portal", "get_qort_trade_portal": "get QORT using Qortal's crosschain trade portal",
"minimal_qort_balance": "having at least {{ quantity }} QORT in your balance (4 qort balance for chat, 1.25 for name, 0.75 for some transactions)",
"mentioned": "mentioned", "mentioned": "mentioned",
"message_with_image": "this message already has an image", "message_with_image": "this message already has an image",
"minimal_qort_balance": "having at least {{ quantity }} QORT in your balance (4 qort balance for chat, 1.25 for name, 0.75 for some transactions)",
"minting_next_level": "with a 24/7 minting you will reach level {{ level }} in <strong>{{ count }} days</strong>",
"most_recent_payment": "{{ count }} most recent payment", "most_recent_payment": "{{ count }} most recent payment",
"name_available": "{{ name }} is available", "name_available": "{{ name }} is available",
"name_benefits": "benefits of a name", "name_benefits": "benefits of a name",
@ -307,8 +308,9 @@
"status": { "status": {
"minting": "(minting)", "minting": "(minting)",
"not_minting": "(not minting)", "not_minting": "(not minting)",
"no_status": "no status",
"synchronized": "synchronized", "synchronized": "synchronized",
"synchronizing": "synchronizing" "synchronizing": "synchronizing..."
}, },
"success": { "success": {
"order_submitted": "your buy order was submitted", "order_submitted": "your buy order was submitted",

View File

@ -307,8 +307,9 @@
"status": { "status": {
"minting": "(acuñado)", "minting": "(acuñado)",
"not_minting": "(no acuñar)", "not_minting": "(no acuñar)",
"no_status": "sin estado",
"synchronized": "sincronizado", "synchronized": "sincronizado",
"synchronizing": "sincronización" "synchronizing": "sincronización..."
}, },
"success": { "success": {
"order_submitted": "Su pedido de compra fue enviado", "order_submitted": "Su pedido de compra fue enviado",

View File

@ -307,8 +307,9 @@
"status": { "status": {
"minting": "(Coupure)", "minting": "(Coupure)",
"not_minting": "(pas de la frappe)", "not_minting": "(pas de la frappe)",
"no_status": "pas de statut",
"synchronized": "synchronisé", "synchronized": "synchronisé",
"synchronizing": "synchronisation" "synchronizing": "synchronisation..."
}, },
"success": { "success": {
"order_submitted": "Votre commande d'achat a été soumise", "order_submitted": "Votre commande d'achat a été soumise",

View File

@ -306,8 +306,9 @@
"status": { "status": {
"minting": "(minting)", "minting": "(minting)",
"not_minting": "(non minting)", "not_minting": "(non minting)",
"no_status": "nessun stato",
"synchronized": "sincronizzato", "synchronized": "sincronizzato",
"synchronizing": "sincronizzazione" "synchronizing": "sincronizzazione..."
}, },
"success": { "success": {
"order_submitted": "l'ordine di acquisto è stato inviato", "order_submitted": "l'ordine di acquisto è stato inviato",

View File

@ -307,8 +307,9 @@
"status": { "status": {
"minting": "(鋳造)", "minting": "(鋳造)",
"not_minting": "(造りではありません)", "not_minting": "(造りではありません)",
"no_status": "ステータスなし",
"synchronized": "同期", "synchronized": "同期",
"synchronizing": "同期" "synchronizing": "同期..."
}, },
"success": { "success": {
"order_submitted": "購入注文が提出されました", "order_submitted": "購入注文が提出されました",

View File

@ -307,8 +307,9 @@
"status": { "status": {
"minting": "(добыча)", "minting": "(добыча)",
"not_minting": "(не шахта)", "not_minting": "(не шахта)",
"no_status": "нет статуса",
"synchronized": "синхронизированный", "synchronized": "синхронизированный",
"synchronizing": "синхронизация" "synchronizing": "синхронизация..."
}, },
"success": { "success": {
"order_submitted": "Ваш заказ на покупку был отправлен", "order_submitted": "Ваш заказ на покупку был отправлен",

View File

@ -307,8 +307,9 @@
"status": { "status": {
"minting": "(铸造)", "minting": "(铸造)",
"not_minting": "(不是铸造)", "not_minting": "(不是铸造)",
"no_status": "没有状态",
"synchronized": "同步", "synchronized": "同步",
"synchronizing": "同步" "synchronizing": "同步..."
}, },
"success": { "success": {
"order_submitted": "您的买入订单已提交", "order_submitted": "您的买入订单已提交",