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
19 changes: 0 additions & 19 deletions app.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<script setup>
/** Vendor */
import * as Sentry from "@sentry/vue"

/** Services */
import Socket from "@/services/api/socket"
import amp from "@/services/amp"
Expand Down Expand Up @@ -135,22 +132,6 @@ onMounted(async () => {
})
}

if (window.location.hostname !== "localhost") {
Sentry.init({
dsn: "https://[email protected]/12",
integrations: [
Sentry.replayIntegration({
maskAllText: false,
blockAllMedia: false,
}),
],

// Session Replay
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
})
}

window.onbeforeunload = function () {
Socket.close()
}
Expand Down
55 changes: 28 additions & 27 deletions components/modules/address/AddressOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ const handleSelect = (tab) => {

/** Pagination */
const page = ref(1)
const limit = 10
const handleNextCondition = ref(true)
const handleNext = () => {
page.value += 1
Expand Down Expand Up @@ -332,8 +333,8 @@ const getTransactions = async () => {

const { data } = await fetchTxsByAddressHash({
hash: props.address.hash,
limit: 10,
offset: (page.value - 1) * 10,
limit: limit,
offset: (page.value - 1) * limit,
sort: sort.dir,
sort_by: sort.by,
status:
Expand All @@ -350,7 +351,7 @@ const getTransactions = async () => {

transactions.value = data.value
cacheStore.current.transactions = transactions.value
handleNextCondition.value = transactions.value.length < 10
handleNextCondition.value = transactions.value?.length < limit

isRefetching.value = false
}
Expand All @@ -360,14 +361,14 @@ const getMessages = async () => {

const { data } = await fetchMessagesByAddressHash({
hash: props.address.hash,
limit: 10,
offset: (page.value - 1) * 10,
limit: limit,
offset: (page.value - 1) * limit,
sort: "desc",
})

messages.value = data.value
cacheStore.current.messages = messages.value
handleNextCondition.value = messages.value.length < 10
handleNextCondition.value = messages.value?.length < limit

isRefetching.value = false
}
Expand All @@ -377,15 +378,15 @@ const getBlobs = async () => {

const { data } = await fetchBlobsByAddressHash({
hash: props.address.hash,
limit: 10,
offset: (page.value - 1) * 10,
limit: limit,
offset: (page.value - 1) * limit,
sort: "desc",
})

if (data.value?.length) {
blobs.value = data.value.map((b) => ({ ...b, signer: props.address }))
}
handleNextCondition.value = data.value.length < 10
handleNextCondition.value = data.value?.length < limit

isRefetching.value = false
}
Expand Down Expand Up @@ -420,14 +421,14 @@ const getDelegations = async () => {

const { data } = await fetchAddressDelegations({
hash: props.address.hash,
limit: 10,
offset: (page.value - 1) * 10,
limit: limit,
offset: (page.value - 1) * limit,
})

if (data.value?.length) {
delegations.value = data.value
}
handleNextCondition.value = data.value.length < 10
handleNextCondition.value = data.value?.length < limit

isRefetching.value = false
}
Expand All @@ -437,14 +438,14 @@ const getRedelegations = async () => {

const { data } = await fetchAddressRedelegations({
hash: props.address.hash,
limit: 10,
offset: (page.value - 1) * 10,
limit: limit,
offset: (page.value - 1) * limit,
})

if (data.value?.length) {
redelegations.value = data.value
}
handleNextCondition.value = data.value.length < 10
handleNextCondition.value = data.value?.length < limit

isRefetching.value = false
}
Expand All @@ -454,14 +455,14 @@ const getUndelegations = async () => {

const { data } = await fetchAddressUndelegations({
hash: props.address.hash,
limit: 10,
offset: (page.value - 1) * 10,
limit: limit,
offset: (page.value - 1) * limit,
})

if (data.value?.length) {
undelegations.value = data.value
}
handleNextCondition.value = data.value.length < 10
handleNextCondition.value = data.value?.length < limit

isRefetching.value = false
}
Expand All @@ -475,14 +476,14 @@ const getGrants = async () => {

const { data } = await fetchAddressGrants({
hash: props.address.hash,
limit: 10,
offset: (page.value - 1) * 10,
limit: limit,
offset: (page.value - 1) * limit,
})

if (data.value?.length) {
grants.value = data.value
}
handleNextCondition.value = data.value.length < 10
handleNextCondition.value = data.value?.length < limit

isRefetching.value = false
}
Expand All @@ -492,14 +493,14 @@ const getGranters = async () => {

const { data } = await fetchAddressGranters({
hash: props.address.hash,
limit: 10,
offset: (page.value - 1) * 10,
limit: limit,
offset: (page.value - 1) * limit,
})

if (data.value?.length) {
granters.value = data.value
}
handleNextCondition.value = data.value.length < 10
handleNextCondition.value = data.value?.length < limit

isRefetching.value = false
}
Expand All @@ -513,13 +514,13 @@ const getVestings = async () => {
const { data } = await fetchAddressVestings({
hash: props.address.hash,
showEnded: showEnded.value,
limit: 10,
offset: (page.value - 1) * 10,
limit: limit,
offset: (page.value - 1) * limit,
})

vestings.value = data.value

handleNextCondition.value = data.value.length < 10
handleNextCondition.value = data.value?.length < limit

isRefetching.value = false
}
Expand Down
12 changes: 6 additions & 6 deletions components/modules/stats/TimelineSlider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -213,19 +213,19 @@ const brushed = ({ selection, sourceEvent }) => {
fixedX1Index = Math.floor(currentX / xBand.step())
fixedX0Index = Math.floor(currentX / xBand.step())

fixedX0 = xBand(new Date(currentData[fixedX0Index].time).toISOString()) - padding
fixedX1 = xBand(new Date(currentData[currentIndex].time).toISOString()) - padding + xBand.step()
fixedX0 = xBand(new Date(currentData[fixedX0Index]?.time).toISOString()) - padding
fixedX1 = xBand(new Date(currentData[currentIndex]?.time).toISOString()) - padding + xBand.step()
}

if (fixedX0Index - currentIndex > 0) {
fixedX0 = xBand(new Date(currentData[currentIndex].time).toISOString()) - padding
fixedX0 = xBand(new Date(currentData[currentIndex]?.time).toISOString()) - padding
setStartEndFromIndex(currentData, currentIndex, fixedX1Index)
} else if (fixedX0Index - currentIndex < 0) {
fixedX1 = xBand(new Date(currentData[currentIndex].time).toISOString()) - padding + xBand.step()
fixedX1 = xBand(new Date(currentData[currentIndex]?.time).toISOString()) - padding + xBand.step()
setStartEndFromIndex(currentData, fixedX0Index, currentIndex)
} else {
fixedX0 = xBand(new Date(currentData[currentIndex].time).toISOString()) - padding
fixedX1 = xBand(new Date(currentData[currentIndex].time).toISOString()) - padding + xBand.step()
fixedX0 = xBand(new Date(currentData[currentIndex]?.time).toISOString()) - padding
fixedX1 = xBand(new Date(currentData[currentIndex]?.time).toISOString()) - padding + xBand.step()
setStartEndFromIndex(currentData, currentIndex, currentIndex)
}
const newX0 = fixedX0
Expand Down
27 changes: 13 additions & 14 deletions components/modules/validator/ValidatorOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const votes = ref([])
const uptime = ref([])

const page = ref(1)
const limit = 10
const handleNextCondition = ref(true)

const handleNext = () => {
Expand All @@ -76,14 +77,14 @@ const getBlocks = async () => {

const { data } = await fetchValidatorBlocks({
id: props.validator.id,
limit: 10,
offset: (page.value - 1) * 10,
limit: limit,
offset: (page.value - 1) * limit,
})

if (data.value?.length) {
blocks.value = data.value
cacheStore.current.blocks = blocks.value
handleNextCondition.value = blocks.value.length < 10
handleNextCondition.value = blocks.value?.length < limit
}

isRefetching.value = false
Expand All @@ -94,12 +95,12 @@ const getDelegators = async () => {

const { data } = await fetchValidatorDelegators({
id: props.validator.id,
limit: 10,
offset: (page.value - 1) * 10,
limit: limit,
offset: (page.value - 1) * limit,
})

delegators.value = data.value
handleNextCondition.value = delegators.value.length < 10
handleNextCondition.value = delegators.value?.length < limit

isRefetching.value = false
}
Expand All @@ -109,12 +110,12 @@ const getJails = async () => {

const { data } = await fetchValidatorJails({
id: props.validator.id,
limit: 10,
offset: (page.value - 1) * 10,
limit: limit,
offset: (page.value - 1) * limit,
})

jails.value = data.value
handleNextCondition.value = jails.value.length < 10
handleNextCondition.value = jails.value?.length < limit

isRefetching.value = false
}
Expand All @@ -124,12 +125,12 @@ const getVotes = async () => {

const { data } = await fetchVotesByAddressHash({
hash: props.validator.delegator?.hash,
limit: 10,
offset: (page.value - 1) * 10,
limit: limit,
offset: (page.value - 1) * limit,
})

votes.value = data.value
handleNextCondition.value = votes.value.length < 10
handleNextCondition.value = votes.value?.length < limit

isRefetching.value = false
}
Expand Down Expand Up @@ -571,8 +572,6 @@ const handleDelegate = () => {
}

.uptime {
/* width: 10px;
height: 10px; */
width: 0.6rem;
height: 0.6rem;

Expand Down
12 changes: 11 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import topLevelAwait from "vite-plugin-top-level-await"
import path from "path"

export default defineNuxtConfig({
modules: ["nuxt-site-config", "@nuxtjs/robots", "@pinia/nuxt", "nuxt-og-image", "@nuxtjs/sitemap"],
modules: ["nuxt-site-config", "@nuxtjs/robots", "@pinia/nuxt", "nuxt-og-image", "@nuxtjs/sitemap", "@sentry/nuxt/module"],

site: {
url: "https://celenium.io",
Expand Down Expand Up @@ -64,11 +64,21 @@ export default defineNuxtConfig({
},
},

sentry: {
sourcemaps: {
disable: true,
},
},

runtimeConfig: {
public: {
AMP: process.env.AMP,
version: "1.20.0",

sentry: {
dsn: process.env.SENTRY_DSN,
},

API_MAINNET: "",
API_MOCHA: "",
API_ARABICA: "",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@keplr-wallet/cosmos": "^0.12.70",
"@openzeppelin/merkle-tree": "^1.0.6",
"@pinia/nuxt": "0.11.0",
"@sentry/vue": "^8.50.0",
"@sentry/nuxt": "^10.19.0",
"@vueuse/core": "^10.9.0",
"buffer": "^6.0.3",
"codemirror": "^6.0.1",
Expand Down
Loading