update staked amount constants
This commit is contained in:
parent
bf3645df44
commit
bf728f8716
3 changed files with 28 additions and 28 deletions
28
dist/bundle.es.js
vendored
28
dist/bundle.es.js
vendored
|
@ -12,11 +12,11 @@ const CHANNEL_ANONYMOUS = 'anonymous';
|
|||
const CHANNEL_NEW = 'new';
|
||||
const PAGE_SIZE = 20;
|
||||
|
||||
const LEVEL_1_STAKED_AMOUNT = 1;
|
||||
const LEVEL_2_STAKED_AMOUNT = 2;
|
||||
const LEVEL_3_STAKED_AMOUNT = 3;
|
||||
const LEVEL_4_STAKED_AMOUNT = 4;
|
||||
const LEVEL_5_STAKED_AMOUNT = 5;
|
||||
const LEVEL_1_STAKED_AMOUNT = 0;
|
||||
const LEVEL_2_STAKED_AMOUNT = 1;
|
||||
const LEVEL_3_STAKED_AMOUNT = 50;
|
||||
const LEVEL_4_STAKED_AMOUNT = 250;
|
||||
const LEVEL_5_STAKED_AMOUNT = 1000;
|
||||
|
||||
var claim = /*#__PURE__*/Object.freeze({
|
||||
MINIMUM_PUBLISH_BID: MINIMUM_PUBLISH_BID,
|
||||
|
@ -2683,19 +2683,19 @@ const makeSelectTotalStakedAmountForChannelUri = uri => reselect.createSelector(
|
|||
});
|
||||
|
||||
const makeSelectStakedLevelForChannelUri = uri => reselect.createSelector(makeSelectTotalStakedAmountForChannelUri(uri), amount => {
|
||||
let level = LEVEL_1_STAKED_AMOUNT;
|
||||
let level = 1;
|
||||
switch (true) {
|
||||
case amount >= 1 && amount < 50:
|
||||
level = LEVEL_2_STAKED_AMOUNT;
|
||||
case amount >= LEVEL_2_STAKED_AMOUNT && amount < LEVEL_3_STAKED_AMOUNT:
|
||||
level = 2;
|
||||
break;
|
||||
case amount >= 50 && amount < 250:
|
||||
level = LEVEL_3_STAKED_AMOUNT;
|
||||
case amount >= LEVEL_3_STAKED_AMOUNT && amount < LEVEL_4_STAKED_AMOUNT:
|
||||
level = 3;
|
||||
break;
|
||||
case amount >= 250 && amount < 1000:
|
||||
level = LEVEL_4_STAKED_AMOUNT;
|
||||
case amount >= LEVEL_4_STAKED_AMOUNT && amount < LEVEL_5_STAKED_AMOUNT:
|
||||
level = 4;
|
||||
break;
|
||||
case amount >= 1000:
|
||||
level = LEVEL_5_STAKED_AMOUNT;
|
||||
case amount >= LEVEL_5_STAKED_AMOUNT:
|
||||
level = 5;
|
||||
break;
|
||||
}
|
||||
return level;
|
||||
|
|
|
@ -4,8 +4,8 @@ export const CHANNEL_ANONYMOUS = 'anonymous';
|
|||
export const CHANNEL_NEW = 'new';
|
||||
export const PAGE_SIZE = 20;
|
||||
|
||||
export const LEVEL_1_STAKED_AMOUNT = 1;
|
||||
export const LEVEL_2_STAKED_AMOUNT = 2;
|
||||
export const LEVEL_3_STAKED_AMOUNT = 3;
|
||||
export const LEVEL_4_STAKED_AMOUNT = 4;
|
||||
export const LEVEL_5_STAKED_AMOUNT = 5;
|
||||
export const LEVEL_1_STAKED_AMOUNT = 0;
|
||||
export const LEVEL_2_STAKED_AMOUNT = 1;
|
||||
export const LEVEL_3_STAKED_AMOUNT = 50;
|
||||
export const LEVEL_4_STAKED_AMOUNT = 250;
|
||||
export const LEVEL_5_STAKED_AMOUNT = 1000;
|
||||
|
|
|
@ -867,19 +867,19 @@ export const makeSelectStakedLevelForChannelUri = (uri: string) =>
|
|||
createSelector(
|
||||
makeSelectTotalStakedAmountForChannelUri(uri),
|
||||
amount => {
|
||||
let level = CLAIM.LEVEL_1_STAKED_AMOUNT;
|
||||
let level = 1;
|
||||
switch (true) {
|
||||
case amount >= 1 && amount < 50:
|
||||
level = CLAIM.LEVEL_2_STAKED_AMOUNT;
|
||||
case amount >= CLAIM.LEVEL_2_STAKED_AMOUNT && amount < CLAIM.LEVEL_3_STAKED_AMOUNT:
|
||||
level = 2;
|
||||
break;
|
||||
case amount >= 50 && amount < 250:
|
||||
level = CLAIM.LEVEL_3_STAKED_AMOUNT;
|
||||
case amount >= CLAIM.LEVEL_3_STAKED_AMOUNT && amount < CLAIM.LEVEL_4_STAKED_AMOUNT:
|
||||
level = 3;
|
||||
break;
|
||||
case amount >= 250 && amount < 1000:
|
||||
level = CLAIM.LEVEL_4_STAKED_AMOUNT;
|
||||
case amount >= CLAIM.LEVEL_4_STAKED_AMOUNT && amount < CLAIM.LEVEL_5_STAKED_AMOUNT:
|
||||
level = 4;
|
||||
break;
|
||||
case amount >= 1000:
|
||||
level = CLAIM.LEVEL_5_STAKED_AMOUNT;
|
||||
case amount >= CLAIM.LEVEL_5_STAKED_AMOUNT:
|
||||
level = 5;
|
||||
break;
|
||||
}
|
||||
return level;
|
||||
|
|
Loading…
Reference in a new issue