Skip to content

Commit

Permalink
hotfix: do not display new staking event popup until there is a new o…
Browse files Browse the repository at this point in the history
…ne (#7417)
  • Loading branch information
begonaalvarezd authored Sep 12, 2023
1 parent 89111dc commit f5bb517
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions packages/shared/routes/dashboard/staking/Staking.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,26 @@
import { handleTransactionEventData, transferState } from 'shared/lib/wallet'
import { onDestroy, onMount } from 'svelte'
import { StakingAirdrop, StakingInfo, StakingSummary } from './views'
import {
ASSEMBLY_EVENT_ID,
ASSEMBLY_EVENT_START_DATE,
LAST_ASSEMBLY_STAKING_PERIOD,
CURRENT_ASSEMBLY_STAKING_PERIOD,
} from 'shared/lib/participation/constants'
const handleNewStakingEvent = (): void => {
openPopup({
type: 'newStakingPeriodNotification',
hideClose: true,
preventClose: false,
})
if (
ASSEMBLY_EVENT_ID &&
ASSEMBLY_EVENT_START_DATE &&
CURRENT_ASSEMBLY_STAKING_PERIOD > 0 &&
LAST_ASSEMBLY_STAKING_PERIOD < CURRENT_ASSEMBLY_STAKING_PERIOD
) {
openPopup({
type: 'newStakingPeriodNotification',
hideClose: true,
preventClose: false,
})
}
updateProfile('hasVisitedStaking', true)
}
Expand Down

0 comments on commit f5bb517

Please sign in to comment.