+
+ :placeholder="placeholder"
+ :ui="inputClassNames"
+ @cleared="clear"
+ @update:model-value="$emit('updated', scope)"/>
@@ -24,35 +26,65 @@ import VueDatePicker from '@vuepic/vue-datepicker'
import '@vuepic/vue-datepicker/dist/main.css'
import { STATISTICS_DATA_BEGINNING } from '@/utils/constants'
-const date = ref()
-const datepicker = ref(null)
const props = defineProps({
- isRangeSelected: {
+ selectedScope: {
+ type: Array,
+ default: null,
+ },
+ isScopeSelected: {
type: Boolean,
required: true,
},
+ placeholder: {
+ type: String,
+ default: 'CUSTOM',
+ },
+ clearable: {
+ type: Boolean,
+ default: false,
+ },
+ type: {
+ type: String,
+ default: 'yyyy-MM-dd',
+ },
})
+const datepicker = ref(null)
+const scope = ref(props.selectedScope)
+const emit = defineEmits(['updated'])
const today = DateTime.now().toFormat('yyyy-MM-dd')
-watch(() => props.isRangeSelected, (newVal, oldVal) => {
- if (!newVal && oldVal) {
- closeDatepicker()
- }
-})
+watch(
+ () => props.isScopeSelected,
+ (newVal, oldVal) => {
+ if (!newVal && oldVal) {
+ close()
+ }
+ if (!newVal) {
+ clear()
+ }
+ },
+)
-function closeDatepicker() {
- if (datepicker) {
+function clear() {
+ scope.value = null
+}
+
+function close() {
+ if (datepicker.value) {
datepicker.value.closeMenu()
}
- date.value = null
}
-defineEmits(['updated'])
+const inputClassNames = computed(() => ({
+ input: `scope-picker__input
+ ${props.isScopeSelected ? 'scope-picker__input--active' : ''}
+ ${props.clearable ? 'scope-picker__input--clearable' : ''}`,
+}))
diff --git a/src/components/TransactionsChartPanel.vue b/src/components/TransactionsChartPanel.vue
index 82a59e66d..75fa2aa58 100644
--- a/src/components/TransactionsChartPanel.vue
+++ b/src/components/TransactionsChartPanel.vue
@@ -19,7 +19,7 @@
+ :interval-by="range.intervalBy"/>
import { storeToRefs } from 'pinia'
import { useChartsStore } from '@/stores/charts'
-import { CHART_INTERVALS_PRESETS_OPTIONS } from '~/utils/constants'
+import { CHART_SCOPE_PRESETS_OPTIONS } from '~/utils/constants'
const chartsStore = useChartsStore()
const { transactionsStatistics } = storeToRefs(chartsStore)
@@ -43,12 +43,12 @@ const { fetchTransactionsStatistics } = chartsStore
const props = defineProps({
hasSelect: {
- required: true,
+ default: true,
type: Boolean,
},
preselectedRange: {
type: Object,
- default: CHART_INTERVALS_PRESETS_OPTIONS[4],
+ default: CHART_SCOPE_PRESETS_OPTIONS[4],
},
})
@@ -68,9 +68,9 @@ if (process.client) {
async function loadTransactionStatistics() {
await fetchTransactionsStatistics(
- range.value.interval,
+ range.value.intervalBy,
range.value.limit,
- range.value.customInterval,
+ range.value.scope,
props.hasSelect ? type.value.typeQuery : null)
}
diff --git a/src/components/TransactionsPanel.vue b/src/components/TransactionsPanel.vue
index c35dbe575..7b159bd89 100644
--- a/src/components/TransactionsPanel.vue
+++ b/src/components/TransactionsPanel.vue
@@ -9,7 +9,13 @@
@prev-clicked="loadPrevTransactions"
@next-clicked="loadNextTransactions">
-
+
import { computed } from 'vue'
import { storeToRefs } from 'pinia'
-import { useRoute, useRouter } from 'nuxt/app'
+import { useRoute } from 'nuxt/app'
import { useTransactionsStore } from '@/stores/transactions'
-import { TX_TYPES_OPTIONS } from '@/utils/constants'
import { isDesktop } from '@/utils/screen'
const transactionsStore = useTransactionsStore()
-const { transactions, transactionsCount, isHydrated, pageIndex, selectedTxType } = storeToRefs(transactionsStore)
-const { fetchTransactions, fetchTransactionsCount, setPageIndex, setSelectedTxType } = transactionsStore
+
+const {
+ transactions,
+ transactionsCount,
+ isHydrated,
+ pageIndex,
+ selectedTxType,
+ selectedScope,
+} = storeToRefs(transactionsStore)
+
+const {
+ loadTransactions,
+ changeRoute,
+ setPageLimit,
+} = transactionsStore
+
const route = useRoute()
-const { push } = useRouter()
const limit = computed(() => process.client && isDesktop() ? 10 : 3)
+if (process.client) {
+ if (!isHydrated?.value) {
+ setPageLimit(limit)
+ await loadTransactions()
+ }
+
+ watch([selectedTxType, selectedScope], () => {
+ changeRoute()
+ })
+
+ watch(() => route.fullPath, async() => {
+ await loadTransactions()
+ })
+}
+
async function loadPrevTransactions() {
- await fetchTransactions(transactions.value.prev)
+ await loadTransactions(transactions.value.prev)
}
async function loadNextTransactions() {
- await fetchTransactions(transactions.value.next)
+ await loadTransactions(transactions.value.next)
}
-async function loadTransactions() {
- const { txType } = route.query
- const txTypeOption = TX_TYPES_OPTIONS.find(option => option.typeQuery === txType)
- setSelectedTxType(txTypeOption || TX_TYPES_OPTIONS[0])
- await fetchTransactions(`/v3/transactions?limit=${limit.value}${selectedTxType.value.typeQuery ? '&type=' + selectedTxType.value.typeQuery : ''}`)
- await fetchTransactionsCount(selectedTxType.value.typeQuery)
- setPageIndex(1)
-}
+
-if (process.client) {
- watch(() => route.fullPath, () => {
- loadTransactions()
- })
+
diff --git a/src/components/TransactionsScopePicker.vue b/src/components/TransactionsScopePicker.vue
new file mode 100644
index 000000000..22708b1e9
--- /dev/null
+++ b/src/components/TransactionsScopePicker.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
diff --git a/src/pages/accounts/index.vue b/src/pages/accounts/index.vue
index be6e09581..311c68196 100644
--- a/src/pages/accounts/index.vue
+++ b/src/pages/accounts/index.vue
@@ -13,7 +13,7 @@
+ :preselected-range="CHART_SCOPE_PRESETS_OPTIONS[0]"/>
@@ -21,7 +21,7 @@
diff --git a/src/pages/charts/hashrate.vue b/src/pages/charts/hashrate.vue
index 47d7c67ac..0128c1891 100644
--- a/src/pages/charts/hashrate.vue
+++ b/src/pages/charts/hashrate.vue
@@ -22,5 +22,5 @@
diff --git a/src/pages/charts/transactions.vue b/src/pages/charts/transactions.vue
index 645469be9..ce26ab8b4 100644
--- a/src/pages/charts/transactions.vue
+++ b/src/pages/charts/transactions.vue
@@ -15,12 +15,12 @@
-
+
diff --git a/src/pages/contracts/index.vue b/src/pages/contracts/index.vue
index d7cb016e0..db3573f67 100644
--- a/src/pages/contracts/index.vue
+++ b/src/pages/contracts/index.vue
@@ -18,7 +18,7 @@
+ :preselected-range="CHART_SCOPE_PRESETS_OPTIONS[0]"/>
@@ -28,7 +28,7 @@
import ContractsPanel from '@/components/ContractsPanel'
import PageHeader from '@/components/PageHeader'
import { contractsHints } from '@/utils/hints/contractsHints'
-import { CHART_INTERVALS_PRESETS_OPTIONS } from '@/utils/constants'
+import { CHART_SCOPE_PRESETS_OPTIONS } from '@/utils/constants'
const { isLoading } = useLoading()
diff --git a/src/pages/names/index.vue b/src/pages/names/index.vue
index d3b4ca5ad..a23fbf415 100644
--- a/src/pages/names/index.vue
+++ b/src/pages/names/index.vue
@@ -17,7 +17,7 @@
+ :preselected-range="CHART_SCOPE_PRESETS_OPTIONS[0]"/>
@@ -44,7 +44,7 @@ import { useNamesStore } from '@/stores/names'
import PageHeader from '@/components/PageHeader'
import { namesHints } from '@/utils/hints/namesHints'
import { isDesktop } from '@/utils/screen'
-import { CHART_INTERVALS_PRESETS_OPTIONS } from '@/utils/constants'
+import { CHART_SCOPE_PRESETS_OPTIONS } from '@/utils/constants'
const TAB_KEYS = ['active', 'in-auction', 'expired']
diff --git a/src/pages/transactions/index.vue b/src/pages/transactions/index.vue
index d3249aa4f..d324f7deb 100644
--- a/src/pages/transactions/index.vue
+++ b/src/pages/transactions/index.vue
@@ -12,7 +12,7 @@
import { transactionsHints } from '@/utils/hints/transactionsHints'
-import { CHART_INTERVALS_PRESETS_OPTIONS } from '@/utils/constants'
+import { CHART_SCOPE_PRESETS_OPTIONS } from '@/utils/constants'
const { isLoading } = useLoading()
diff --git a/src/stores/charts.js b/src/stores/charts.js
index 19c616887..ba6c9495e 100644
--- a/src/stores/charts.js
+++ b/src/stores/charts.js
@@ -14,96 +14,96 @@ export const useChartsStore = defineStore('charts', () => {
const hashrateStatistics = ref(null)
const accountsStatistics = ref(null)
- async function fetchTransactionsStatistics(interval, limit, customInterval, txType) {
+ async function fetchTransactionsStatistics(intervalBy, limit, scope, txType) {
transactionsStatistics.value = null
- const intervalSlug = customInterval
- ? `?min_start_date=${customInterval.minStart}&max_start_date=${customInterval.maxStart}&limit=1000`
- : `?interval_by=${interval}&limit=${parseInt(limit) + 1}`
+ const scopeSlug = scope
+ ? `?min_start_date=${scope.minStart}&max_start_date=${scope.maxStart}&limit=1000`
+ : `?interval_by=${intervalBy}&limit=${parseInt(limit) + 1}`
const typeSlug = txType ? '&tx_type=' + txType : ''
- const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/stats/transactions${intervalSlug + typeSlug}`)
+ const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/stats/transactions${scopeSlug + typeSlug}`)
// remove last interval from the response not to show current interval that is being built
- transactionsStatistics.value = customInterval ? data.data.reverse() : data.data.slice(1).reverse()
+ transactionsStatistics.value = scope ? data.data.reverse() : data.data.slice(1).reverse()
}
- async function fetchKeyblocksStatistics(interval, limit, customInterval) {
+ async function fetchKeyblocksStatistics(intervalBy, limit, scope) {
keyblocksStatistics.value = null
- const intervalSlug = customInterval
- ? `?min_start_date=${customInterval.minStart}&max_start_date=${customInterval.maxStart}&limit=1000`
- : `?interval_by=${interval}&limit=${parseInt(limit) + 1}`
+ const scopeSlug = scope
+ ? `?min_start_date=${scope.minStart}&max_start_date=${scope.maxStart}&limit=1000`
+ : `?interval_by=${intervalBy}&limit=${parseInt(limit) + 1}`
- const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/stats/blocks${intervalSlug}&type=key`)
+ const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/stats/blocks${scopeSlug}&type=key`)
// remove last interval from the response not to show current interval that is being built
- keyblocksStatistics.value = customInterval ? data.data.reverse() : data.data.slice(1).reverse()
+ keyblocksStatistics.value = scope ? data.data.reverse() : data.data.slice(1).reverse()
}
- async function fetchContractsStatistics(interval, limit, customInterval) {
+ async function fetchContractsStatistics(intervalBy, limit, scope) {
contractsStatistics.value = null
- const intervalSlug = customInterval
- ? `&min_start_date=${customInterval.minStart}&max_start_date=${customInterval.maxStart}&limit=1000`
- : `&interval_by=${interval}&limit=${parseInt(limit) + 1}`
+ const scopeSlug = scope
+ ? `&min_start_date=${scope.minStart}&max_start_date=${scope.maxStart}&limit=1000`
+ : `&interval_by=${intervalBy}&limit=${parseInt(limit) + 1}`
- const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/stats/transactions?tx_type=contract_call${intervalSlug}`)
+ const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/stats/transactions?tx_type=contract_call${scopeSlug}`)
// remove last interval from the response not to show current interval that is being built
- contractsStatistics.value = customInterval ? data.data.reverse() : data.data.slice(1).reverse()
+ contractsStatistics.value = scope ? data.data.reverse() : data.data.slice(1).reverse()
}
- async function fetchNamesStatistics(interval, limit, customInterval) {
+ async function fetchNamesStatistics(intervalBy, limit, scope) {
namesStatistics.value = null
- const intervalSlug = customInterval
- ? `?min_start_date=${customInterval.minStart}&max_start_date=${customInterval.maxStart}&limit=100`
- : `?interval_by=${interval}&limit=${limit}`
+ const scopeSlug = scope
+ ? `?min_start_date=${scope.minStart}&max_start_date=${scope.maxStart}&limit=100`
+ : `?interval_by=${intervalBy}&limit=${limit}`
- const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/stats/names${intervalSlug}`)
+ const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/stats/names${scopeSlug}`)
// remove last interval from the response not to show current interval that is being built
- namesStatistics.value = customInterval ? data.data.reverse() : data.data.slice(1).reverse()
+ namesStatistics.value = scope ? data.data.reverse() : data.data.slice(1).reverse()
}
- async function fetchDifficultyStatistics(interval, limit, customInterval) {
+ async function fetchDifficultyStatistics(intervalBy, limit, scope) {
difficultyStatistics.value = null
- const intervalSlug = customInterval
- ? `?min_start_date=${customInterval.minStart}&max_start_date=${customInterval.maxStart}&limit=100`
- : `?interval_by=${interval}&limit=${limit}`
+ const scopeSlug = scope
+ ? `?min_start_date=${scope.minStart}&max_start_date=${scope.maxStart}&limit=100`
+ : `?interval_by=${intervalBy}&limit=${limit}`
- const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/stats/difficulty${intervalSlug}`)
+ const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/stats/difficulty${scopeSlug}`)
// remove last interval from the response not to show current interval that is being built
- difficultyStatistics.value = customInterval ? data.data.reverse() : data.data.slice(1).reverse()
+ difficultyStatistics.value = scope ? data.data.reverse() : data.data.slice(1).reverse()
}
- async function fetchHashrateStatistics(interval, limit, customInterval) {
+ async function fetchHashrateStatistics(intervalBy, limit, scope) {
hashrateStatistics.value = null
- const intervalSlug = customInterval
- ? `?min_start_date=${customInterval.minStart}&max_start_date=${customInterval.maxStart}&limit=100`
- : `?interval_by=${interval}&limit=${limit}`
+ const scopeSlug = scope
+ ? `?min_start_date=${scope.minStart}&max_start_date=${scope.maxStart}&limit=100`
+ : `?interval_by=${intervalBy}&limit=${limit}`
- const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/stats/hashrate${intervalSlug}`)
+ const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/stats/hashrate${scopeSlug}`)
// remove last interval from the response not to show current interval that is being built
- hashrateStatistics.value = customInterval ? data.data.reverse() : data.data.slice(1).reverse()
+ hashrateStatistics.value = scope ? data.data.reverse() : data.data.slice(1).reverse()
}
- async function fetchAccountsStatistics(interval, limit, customInterval) {
+ async function fetchAccountsStatistics(intervalBy, limit, scope) {
accountsStatistics.value = null
- const intervalSlug = customInterval
- ? `?min_start_date=${customInterval.minStart}&max_start_date=${customInterval.maxStart}&limit=100`
- : `?interval_by=${interval}&limit=${limit}`
+ const scopeSlug = scope
+ ? `?min_start_date=${scope.minStart}&max_start_date=${scope.maxStart}&limit=100`
+ : `?interval_by=${intervalBy}&limit=${limit}`
- const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/stats/active-accounts${intervalSlug}`)
+ const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/stats/active-accounts${scopeSlug}`)
// remove last interval from the response not to show current interval that is being built
- accountsStatistics.value = customInterval ? data.data.reverse() : data.data.slice(1).reverse()
+ accountsStatistics.value = scope ? data.data.reverse() : data.data.slice(1).reverse()
}
return {
diff --git a/src/stores/transactions.js b/src/stores/transactions.js
index 1b7a722a2..e4f919f82 100644
--- a/src/stores/transactions.js
+++ b/src/stores/transactions.js
@@ -1,6 +1,6 @@
import { defineStore } from 'pinia'
-import { useRuntimeConfig } from 'nuxt/app'
-import { ref } from 'vue'
+import { useRoute, useRuntimeConfig } from 'nuxt/app'
+import { computed, ref } from 'vue'
import useAxios from '@/composables/useAxios'
import { adaptTransactions } from '@/utils/adapters'
import { formatAePrice, formatAettosToAe } from '@/utils/format'
@@ -9,7 +9,11 @@ import { TX_TYPES_OPTIONS } from '@/utils/constants'
export const useTransactionsStore = defineStore('transactions', () => {
const { MIDDLEWARE_URL } = useRuntimeConfig().public
const axios = useAxios()
+ const route = useRoute()
+ const { push } = useRouter()
+ const isHydrated = ref(false)
+ const pageIndex = ref(1)
const rawTransactions = ref(null)
const transactionsCount = ref(null)
const transactionsStatistics = ref(null)
@@ -17,9 +21,9 @@ export const useTransactionsStore = defineStore('transactions', () => {
const last24hsTransactionsTrend = ref(null)
const last24hsAverageTransactionFees = ref(null)
const feesTrend = ref(null)
- const isHydrated = ref(null)
- const pageIndex = ref(1)
const selectedTxType = ref(TX_TYPES_OPTIONS[0])
+ const selectedScope = ref(null)
+ const pageLimit = ref(null)
const transactions = computed(() =>
rawTransactions.value
@@ -27,18 +31,82 @@ export const useTransactionsStore = defineStore('transactions', () => {
: null,
)
- async function fetchTransactions(queryParameters = null) {
+ const slug = computed(() => {
+ const scope = formatScopeSlug(selectedScope.value)
+ const type = formatTypeSlug(selectedTxType.value)
+ return formatSlug(scope, type)
+ })
+
+ function setUrlParametersToStore() {
+ const { scope, txType } = route.query
+ selectedTxType.value = formatUrlToTypeObject(txType)
+ selectedScope.value = formatUrlToScopeObject(scope)
+ }
+
+ function changeRoute() {
+ push(`/transactions${slug.value}`)
+ }
+
+ async function loadTransactions(queryParameters) {
+ setUrlParametersToStore()
+
+ const type = formatMDWTypeSlug(selectedTxType.value)
+ const scope = formatMDWScopeSlug(selectedScope.value)
+
+ await Promise.all([
+ fetchTransactions({ queryParameters, scope, type, limit: pageLimit.value }),
+ fetchTransactionsCount({ scope, type }),
+ ])
+ setPageIndex(1)
+ }
+
+ async function fetchTransactions({ queryParameters, scope, type, limit } = {}) {
rawTransactions.value = null
- const { data } = await axios.get(`${MIDDLEWARE_URL}${queryParameters || '/v3/transactions?limit=10'}`)
+
+ if (queryParameters) {
+ const { data } = await axios.get(`${MIDDLEWARE_URL}${queryParameters}`)
+ isHydrated.value = true
+ rawTransactions.value = data
+ return
+ }
+
+ const url = new URL(`${MIDDLEWARE_URL}/v3/transactions`)
+
+ url.searchParams.append('limit', limit.value ?? 10)
+
+ if (scope) {
+ url.searchParams.append('scope', scope)
+ }
+
+ if (type) {
+ url.searchParams.append('type', type)
+ }
+
+ const { data } = await axios.get(url.toString())
+
isHydrated.value = true
rawTransactions.value = data
}
- async function fetchTransactionsCount(txType = null) {
+ async function fetchTransactionsCount({ scope, type }) {
transactionsCount.value = null
- const url = txType ? `${MIDDLEWARE_URL}/v3/transactions/count?tx_type=${txType}` : `${MIDDLEWARE_URL}/v3/transactions/count`
- const { data } = await axios.get(url)
- transactionsCount.value = data
+ if (scope && type) {
+ // todo workaround reoprt to MDW + add E2 TESTS for counter
+ transactionsCount.value = null
+ } else {
+ const url = new URL(`${MIDDLEWARE_URL}/v3/transactions/count`)
+
+ if (scope) {
+ url.searchParams.append('scope', scope)
+ }
+
+ if (type) {
+ url.searchParams.append('type', type)
+ }
+
+ const { data } = await axios.get(url.toString())
+ transactionsCount.value = data
+ }
}
async function fetchLast24hsTransactionsStatistics() {
@@ -54,8 +122,43 @@ export const useTransactionsStore = defineStore('transactions', () => {
pageIndex.value = index
}
- function setSelectedTxType(txType) {
- selectedTxType.value = txType
+ function setPageLimit(value) {
+ pageLimit.value = value
+ }
+
+ function formatSlug(scope, type) {
+ const slugParts = [scope, type].filter(Boolean)
+ return slugParts.length ? `?${slugParts.join('&')}` : ''
+ }
+
+ function formatScopeSlug(scope) {
+ return scope ? `scope=${scope[0]}-${scope[1]}` : null
+ }
+
+ function formatTypeSlug(txType) {
+ return txType?.typeQuery ? `txType=${txType.typeQuery}` : null
+ }
+
+ function formatUrlToTypeObject(txType) {
+ return txType
+ ? TX_TYPES_OPTIONS.find(option => option.typeQuery === txType)
+ : TX_TYPES_OPTIONS[0]
+ }
+
+ function formatUrlToScopeObject(scope) {
+ if (!scope) {
+ return null
+ }
+ const [min, max] = scope.split('-')
+ return [min, max]
+ }
+
+ function formatMDWScopeSlug(scope) {
+ return scope ? `time:${scope[0]}-${scope[1]}` : null
+ }
+
+ function formatMDWTypeSlug(selectedTxType) {
+ return selectedTxType?.typeQuery
}
return {
@@ -68,11 +171,13 @@ export const useTransactionsStore = defineStore('transactions', () => {
last24hsTransactionsCount,
last24hsTransactionsTrend,
last24hsAverageTransactionFees,
+ loadTransactions,
+ changeRoute,
feesTrend,
isHydrated,
pageIndex,
selectedTxType,
- setPageIndex,
- setSelectedTxType,
+ selectedScope,
+ setPageLimit,
}
})
diff --git a/src/utils/constants.js b/src/utils/constants.js
index 237b89c6f..ee018dfab 100644
--- a/src/utils/constants.js
+++ b/src/utils/constants.js
@@ -3,7 +3,7 @@ export const MARKET_STATS_COINSTORE_ADDRESS = 'https://api.coinstore.com/api/v1/
export const MARKET_STATS_HOTCOIN_ADDRESS = 'https://api.hotcoinfin.com/v1/market/ticker'
export const MINUTES_PER_BLOCK = 3
export const TX_TYPES_OPTIONS = [
- { typeQuery: null, label: 'All types' },
+ { typeQuery: null, label: 'All Types' },
{ typeQuery: 'spend', label: 'SpendTx' },
{ typeQuery: 'contract_call', label: 'ContractCallTx' },
{ typeQuery: 'contract_create', label: 'ContractCreateTx' },
@@ -29,12 +29,12 @@ export const TX_TYPES_OPTIONS = [
{ typeQuery: 'ga_meta', label: 'GAMetaTx' },
{ typeQuery: 'paying_for', label: 'PayingForTx' },
]
-export const CHART_INTERVALS_PRESETS_OPTIONS = [
- { interval: 'day', limit: '7', label: '1W' },
- { interval: 'day', limit: '30', label: '1M' },
- { interval: 'day', limit: '90', label: '3M' },
- { interval: 'month', limit: '12', label: '1Y' },
- { interval: 'month', limit: '100', label: 'ALL' },
+export const CHART_SCOPE_PRESETS_OPTIONS = [
+ { intervalBy: 'day', limit: '7', label: '1W' },
+ { intervalBy: 'day', limit: '30', label: '1M' },
+ { intervalBy: 'day', limit: '90', label: '3M' },
+ { intervalBy: 'month', limit: '12', label: '1Y' },
+ { intervalBy: 'month', limit: '100', label: 'ALL' },
]
export const ORACLE_STATES_OPTIONS = [
{ stateQuery: 'active', label: 'Active' },