Skip to content

Commit

Permalink
fix crash + open modal state
Browse files Browse the repository at this point in the history
  • Loading branch information
namgold committed Jul 17, 2023
1 parent 74a68c6 commit 64e5893
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/pages/KyberDAO/KNCUtility/GasRefundBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,8 @@ export default function GasRefundBox() {
const upToXXSmall = useMedia(`(max-width: ${MEDIA_WIDTHS.upToXXSmall}px)`)
const upToExtraSmall = useMedia(`(max-width: ${MEDIA_WIDTHS.upToExtraSmall}px)`)
const { userTier, gasRefundPerCentage } = useGasRefundTier()
const {
daoInfo: { first_epoch_start_timestamp, current_epoch, epoch_period_in_seconds },
} = useVotingInfo()
const { daoInfo: { first_epoch_start_timestamp = 0, current_epoch = 0, epoch_period_in_seconds = 0 } = {} } =
useVotingInfo()

const claimRewards = useCallback(async () => {
if (!account || !library || !claimableReward || claimableReward.knc <= 0) return
Expand Down Expand Up @@ -306,7 +305,7 @@ export default function GasRefundBox() {
{!!account && !!eligibleTxs?.transactions.length && (
<ButtonLight
padding="2px 12px"
onClick={isShowEligibleTx => setShowEligibleTx(!isShowEligibleTx)}
onClick={() => setShowEligibleTx(isShowEligibleTx => !isShowEligibleTx)}
style={{ whiteSpace: 'nowrap' }}
width="max-content"
>
Expand Down

0 comments on commit 64e5893

Please sign in to comment.