Skip to content

Commit

Permalink
chore: cleanup comments and change logic for glow formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwellmattryan committed Jul 25, 2022
1 parent 43c7a64 commit 59ae312
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/shared/lib/participation/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,18 @@ export const SHIMMER_STAKING_RESULT_FILES: string[] = ['shimmer.json']
export const LAST_ASSEMBLY_STAKING_PERIOD = 2

/**
* The number of the last completed Assembly staking period.
* The number of the current Assembly staking period.
* Set to 0 if no current event
*/
export const CURRENT_ASSEMBLY_STAKING_PERIOD = 3

/**
* The number of the last completed Assembly staking period.
* The number of the last completed Shimmer staking period.
*/
export const LAST_SHIMMER_STAKING_PERIOD = 1

/**
* The number of the last completed Assembly staking period.
* The number of the current Shimmer staking period.
* Set to 0 if no current event
*/
export const CURRENT_SHIMMER_STAKING_PERIOD = 0
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/lib/participation/staking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export const formatStakingAirdropReward = (airdrop: StakingAirdrop, amount: numb
const [integer, float] = (amount / 1_000_000).toFixed(decimalPlaces).split('.')

let reward: string
const shouldModifyForGlowUnits = Number(integer) <= 0 && airdrop === StakingAirdrop.Shimmer
const shouldModifyForGlowUnits = Number(integer) <= 0 && Number(float) > 0 && airdrop === StakingAirdrop.Shimmer
if (shouldModifyForGlowUnits) {
reward = `${delineateNumber(float, thousandthSeparator)}` ?? '0'
return `${reward} glow`
Expand Down

0 comments on commit 59ae312

Please sign in to comment.