Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const exchangeRates = computed(() => latestState.value?.exchange_rates ?? [])
const exchangeRateLengthOnTestNetworks = 1
if (exchangeRates.value.length === exchangeRateLengthOnTestNetworks) {
const { selectedCurrencyMain } = useCurrency()
selectedCurrencyMain.value = exchangeRates.value[0].code as CurrencyCode
selectedCurrencyMain.value = exchangeRates.value[0]?.code as CurrencyCode
}
</script>

Expand Down
4 changes: 2 additions & 2 deletions frontend/assets/css/prime.scss
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ div.p-checkbox {
}
}

.p-toggleswitch-slider:before {
.p-toggleswitch-handle {
background: var(--switch-slider-color) !important;
width: 20px;
height: 20px;
Expand All @@ -251,7 +251,7 @@ div.p-checkbox {
transition-duration: 0.2s;
}

&.p-toggleswitch-checked .p-toggleswitch-slider:before {
&.p-toggleswitch-checked .p-toggleswitch-handle {
transform: translateX(20.6px);
}

Expand Down
1 change: 0 additions & 1 deletion frontend/components/bc/PageWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ defineProps<{
<slot name="banner" />
<main class="content">
<slot name="top" />
<!-- <BcAdControl /> -->
<slot />
<div id="bottom_banner" />
<slot name="bottom" />
Expand Down
112 changes: 0 additions & 112 deletions frontend/components/bc/ad/AdComponent.vue

This file was deleted.

27 changes: 0 additions & 27 deletions frontend/components/bc/ad/AdControl.vue

This file was deleted.

2 changes: 1 addition & 1 deletion frontend/components/bc/toggle/SingleBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function onButtonClicked(value: string) {
:icon="button.icon"
:text="button.text"
:sub-text="button.subText"
:selected="values[button.value]"
:selected="values[button.value] ?? false"
:tooltip="button.tooltip"
:disabled="button.disabled"
:class="[layout, button.className]"
Expand Down
4 changes: 2 additions & 2 deletions frontend/components/dashboard/DashboardControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,12 @@ const deleteAction = async (
}
if ((preferedDashboards?.length ?? 0) > 0) {
setDashboardKey(`${preferedDashboards[0].id}`)
setDashboardKey(`${preferedDashboards[0]?.id}`)
return
}
if ((fallbackDashboards.length ?? 0) > 0) {
await navigateTo(`${fallbackUrl}${fallbackDashboards[0].id}`)
await navigateTo(`${fallbackUrl}${fallbackDashboards[0]?.id}`)
return
}
}
Expand Down
6 changes: 3 additions & 3 deletions frontend/components/dashboard/DashboardHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ const items = computed<MenuBarEntry[]>(() => {
const count = hasMoreItems && width.value >= 520 ? ` (${items.length})` : ''
buttons.push({
active: !!active,
command: !hasMoreItems ? items[0].command : undefined,
disabledTooltip: !hasMoreItems ? items[0].disabledTooltip : undefined,
command: !hasMoreItems ? items[0]?.command : undefined,
disabledTooltip: !hasMoreItems ? items[0]?.disabledTooltip : undefined,
dropdown: hasMoreItems,
items: hasMoreItems ? items : undefined,
label: label + count,
route: !hasMoreItems ? items[0].route : undefined,
route: !hasMoreItems ? items[0]?.route : undefined,
})
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const isLoading = computed(() => status.value === 'pending')
const handleSearch = (input: string) => {
if (!input.length) return
error.value = null
error.value = undefined
execute()
}
const emit = defineEmits<{
Expand Down
18 changes: 9 additions & 9 deletions frontend/components/dashboard/chart/DashboardChartRewards.vue
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ const getGroupInfo = (series: ChartSeries<number, string>[], currentIndex: numbe
name: groups.value.find(group => group.id === id)?.name ?? '',
value: data[currentIndex] === '0' || data[currentIndex] === null
? '-'
: formatAmount(data[currentIndex], {
: formatAmount(data[currentIndex] ?? '0', {
hasCurrencyDisplay: true,
hasHigherPrecision: true,
hasUnitDisplay: true,
Expand All @@ -292,7 +292,7 @@ const getGroupInfo = (series: ChartSeries<number, string>[], currentIndex: numbe
name: groups.value.find(group => group.id === id)?.name ?? '',
value: data[currentIndex] === '0' || data[currentIndex] === null
? '-'
: formatAmount(data[currentIndex], {
: formatAmount(data[currentIndex] ?? '0', {
hasCurrencyDisplay: true,
hasHigherPrecision: true,
hasUnitDisplay: true,
Expand Down Expand Up @@ -358,13 +358,13 @@ const option = computed<EChartsOption>(() => {

const paramsConsensusLayer = params.find(param => param.seriesId === seriesId.cl)
const paramsExecutionLayer = params.find(param => param.seriesId === seriesId.el)
const currentIndex = params[0].dataIndex
const currentIndex = params[0]?.dataIndex
const currentEpoch = {
index: params[0].name,
timestamp: Number(params[0].name),
index: params[0]?.name ?? '0',
timestamp: Number(params[0]?.name),
}
const currentGroupTotalCl = clSeriesGroupTotal.value[currentIndex]
const currentGroupTotalEl = elSeriesGroupTotal.value[currentIndex]
const currentGroupTotalCl = clSeriesGroupTotal.value[currentIndex ?? 0]
const currentGroupTotalEl = elSeriesGroupTotal.value[currentIndex ?? 0]

const consensusLayerRewardSum = currentGroupTotalCl === '0'
? '-'
Expand All @@ -389,8 +389,8 @@ const option = computed<EChartsOption>(() => {
const executionLayerRewardSumLabel = paramsExecutionLayer?.seriesName ?? ''

const groupInfo = {
cl: getGroupInfo(clSeries.value, currentIndex),
el: getGroupInfo(elSeries.value, currentIndex),
cl: getGroupInfo(clSeries.value, currentIndex ?? 0),
el: getGroupInfo(elSeries.value, currentIndex ?? 0),
}

const d = document.createElement('div')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ const option = computed<EChartsOption>(() => {
extraCssText: 'z-index: 100;',
formatter(params) {
if (!Array.isArray(params)) return ''
const ts = parseInt(params[0].name)
const ts = parseInt(params[0]?.name ?? '0')
let lastDif = 0
let highlightGroup = ''
const groupInfos = params.map((param: any) => {
Expand Down
6 changes: 3 additions & 3 deletions frontend/components/dashboard/slot-viz/DashboardSlotViz.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ const mostRecentScheduledSlotId = computed(() => {

for (let i = 0; i < slotViz.value.length; i++) {
const row = slotViz.value[i]
if (!row.slots?.length) {
if (!row?.slots?.length) {
continue
}
for (let j = row.slots.length - 1; j >= 0; j--) {
if (row.slots[j].status === 'scheduled') {
id = row.slots[j].slot
if (row?.slots[j]?.status === 'scheduled') {
id = row?.slots[j]?.slot ?? 0
}
else {
return id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ watch(() => overview.value, () => {
watch(() => persistedSelectedCategories.value[storageDashboardKey.value],
() => {
if (persistedSelectedCategories.value[storageDashboardKey.value]) {
emit('updateCategories', persistedSelectedCategories.value[storageDashboardKey.value])
emit('updateCategories', persistedSelectedCategories.value[storageDashboardKey.value] ?? [])
}
},
{ immediate: true },
Expand All @@ -97,7 +97,7 @@ watch(() => persistedSelectedCategories.value[storageDashboardKey.value],
</div>
<ClientOnly v-else>
<BcToggleMultiBar
v-model="persistedSelectedCategories[storageDashboardKey]"
v-model="persistedSelectedCategories[storageDashboardKey] as []"
:buttons="icons"
/>
</ClientOnly>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ const data = computed(() => {
/>
<LazyDashboardSlotVizDutyIcon
v-if="data.icons?.length"
:icon="data.icons[0]"
:icon="data.icons[0]!"
class="first_icon"
:class="data.firstIconClass"
/>
<LazyDashboardSlotVizDutyIcon
v-if="data.icons?.length === 2"
:icon="data.icons[1]"
:icon="data.icons[1]!"
class="second_icon"
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ watch(
<template #body="{ data }">
<DashboardTableSummaryValidators
:validators="data.validators"
:is-absolute="showAbsoluteValuesPersisted[storageDashboardKey]"
:is-absolute="showAbsoluteValuesPersisted[storageDashboardKey] ?? false"
:row="data"
:group-id="data.group_id"
:dashboard-key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const summarySections = computed<SummaryRow[][]>(() => {
property,
title,
}
sections[index].push(row)
sections[index]?.push(row)
}

const addSummaryPropertiesToSection = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function createDutyLabels(dutyObjects?: number[]) {
switch (props.category) {
case 'exiting':
case 'pending':
return getRelativeTime(dutyObjects[0])
return getRelativeTime(dutyObjects[0] ?? 0)
case 'got_slashed':
return $t('dashboard.validator.subset_dialog.got_slashed') + ':'
case 'has_slashed':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ const subsets = computed<ValidatorSubset[]>(() => {
xWithdrawing,
],
]
baseSubset.validators.forEach((v) => {
baseSubset?.validators.forEach((v) => {
subsets.forEach(([
origin,
merged,
Expand Down
Loading