forked from LaconicNetwork/cosmos-explorer
refactor
This commit is contained in:
@@ -27,7 +27,7 @@ import { BTable } from 'bootstrap-vue'
|
||||
|
||||
import {
|
||||
getStakingValidatorByHex, isHexAddress, isToken, percent, toDay, tokenFormatter,
|
||||
} from '@/libs/data/data'
|
||||
} from '@/libs/utils'
|
||||
|
||||
export default {
|
||||
name: 'ArrayFieldComponent',
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ import { BCard, BTable } from 'bootstrap-vue'
|
||||
import { fromBase64 } from '@cosmjs/encoding'
|
||||
import { decodeTxRaw } from '@cosmjs/proto-signing'
|
||||
import Tx from '@/libs/data/tx'
|
||||
import { abbrMessage, tokenFormatter } from '@/libs/data'
|
||||
import { abbrMessage, tokenFormatter } from '@/libs/utils'
|
||||
import ObjectFieldComponent from './ObjectFieldComponent.vue'
|
||||
import ArrayFieldComponent from './ArrayFieldComponent.vue'
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ import {
|
||||
getCachedValidators,
|
||||
getStakingValidatorByHex,
|
||||
toDay,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
// import fetch from 'node-fetch'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { percent } from '@/libs/data'
|
||||
import { percent } from '@/libs/utils'
|
||||
import { $themeColors } from '@themeConfig'
|
||||
|
||||
import ChartjsComponentDoughnutChart from './ChartjsComponentDoughnutChart.vue'
|
||||
|
||||
@@ -268,7 +268,7 @@ import {
|
||||
import FlipCountdown from 'vue2-flip-countdown'
|
||||
// import fetch from 'node-fetch'
|
||||
|
||||
import { getCachedValidators, getStakingValidatorByAccount, tokenFormatter } from '@/libs/data/data'
|
||||
import { getCachedValidators, getStakingValidatorByAccount, tokenFormatter } from '@/libs/utils'
|
||||
import { Proposal, Proposer } from '@/libs/data'
|
||||
import dayjs from 'dayjs'
|
||||
import ObjectFieldComponent from './ObjectFieldComponent.vue'
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
import {
|
||||
BCard, BCardTitle, VBTooltip,
|
||||
} from 'bootstrap-vue'
|
||||
import { formatTokenDenom } from '@/libs/data'
|
||||
import { formatTokenDenom } from '@/libs/utils'
|
||||
// import fetch from 'node-fetch'
|
||||
|
||||
export default {
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@ import {
|
||||
import Ripple from 'vue-ripple-directive'
|
||||
import VuexyLogo from '@core/layouts/components/Logo.vue'
|
||||
import store from '@/store/index'
|
||||
import { timeIn, toDay } from '@/libs/data'
|
||||
import { timeIn, toDay } from '@/libs/utils'
|
||||
import DarkToggler from '@/@core/layouts/components/app-navbar/components/DarkToggler.vue'
|
||||
import Locale from '@/@core/layouts/components/app-navbar/components/Locale.vue'
|
||||
import AppFooter from '@/@core/layouts/components/AppFooter.vue'
|
||||
|
||||
@@ -73,7 +73,7 @@ import {
|
||||
} from 'bootstrap-vue'
|
||||
import {
|
||||
abbr, getStakingValidatorByHex, isHexAddress, isStringArray, isToken, percent, tokenFormatter,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import ArrayFieldComponent from './ArrayFieldComponent.vue'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -286,7 +286,7 @@ import {
|
||||
} from '@validations'
|
||||
import {
|
||||
abbrAddress, formatToken, formatTokenDenom, getLocalAccounts, getUnitAmount, setLocalTxHistory, sign, timeIn,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import vSelect from 'vue-select'
|
||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@ import {
|
||||
import {
|
||||
abbrAddress,
|
||||
formatToken, formatTokenDenom, getLocalAccounts, getUnitAmount, setLocalTxHistory, sign, timeIn,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -254,7 +254,7 @@ import {
|
||||
} from '@validations'
|
||||
import {
|
||||
formatToken, formatTokenDenom, getUnitAmount, setLocalTxHistory, sign, timeIn,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import vSelect from 'vue-select'
|
||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@ import {
|
||||
} from '@validations'
|
||||
import {
|
||||
formatToken, formatTokenDenom, getLocalAccounts, getLocalChains, getUnitAmount, setLocalTxHistory, sign, timeIn,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import { Cosmos } from '@cosmostation/cosmosjs'
|
||||
import vSelect from 'vue-select'
|
||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||
|
||||
@@ -257,7 +257,7 @@ import {
|
||||
} from '@validations'
|
||||
import {
|
||||
formatToken, formatTokenDenom, getLocalAccounts, getLocalChains, getUnitAmount, setLocalTxHistory, sign, timeIn,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import { Cosmos } from '@cosmostation/cosmosjs'
|
||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ import {
|
||||
} from '@validations'
|
||||
import {
|
||||
formatToken, formatTokenDenom, getUnitAmount, setLocalTxHistory, sign, timeIn,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import vSelect from 'vue-select'
|
||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ import {
|
||||
import {
|
||||
abbrAddress,
|
||||
formatToken, getLocalAccounts, setLocalTxHistory, sign, timeIn,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -169,7 +169,7 @@ import {
|
||||
} from '@validations'
|
||||
import {
|
||||
formatToken, setLocalTxHistory, sign, timeIn,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -177,7 +177,7 @@ import {
|
||||
} from '@validations'
|
||||
import {
|
||||
formatToken, getLocalAccounts, getLocalChains, sign, timeIn, setLocalTxHistory,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -114,7 +114,7 @@ import {
|
||||
BRow, BCol, BCard, BButton, BPopover, BTable, BSpinner,
|
||||
} from 'bootstrap-vue'
|
||||
import { CoinGeckoMap, getPairName } from '@/libs/osmos'
|
||||
import { formatTokenDenom } from '@/libs/data'
|
||||
import { formatTokenDenom } from '@/libs/utils'
|
||||
import FeatherIcon from '@/@core/components/feather-icon/FeatherIcon.vue'
|
||||
import Place from './components/KlineTrade/Place.vue'
|
||||
// import Kline from './components/kline/index.vue'
|
||||
|
||||
@@ -117,7 +117,7 @@ import {
|
||||
} from 'bootstrap-vue'
|
||||
import {
|
||||
Validator, percent, StakingParameters, formatToken,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import { keybase } from '@/libs/fetch'
|
||||
// import { toHex } from '@cosmjs/encoding'
|
||||
// import fetch from 'node-fetch'
|
||||
|
||||
@@ -53,7 +53,7 @@ import {
|
||||
} from 'bootstrap-vue'
|
||||
import VueApexCharts from 'vue-apexcharts'
|
||||
import { $themeColors } from '@themeConfig'
|
||||
import { percent, toDay } from '@/libs/data'
|
||||
import { percent, toDay } from '@/libs/utils'
|
||||
|
||||
const $strokeColor = '#ebe9f1'
|
||||
const $textHeadingColor = '#5e5873'
|
||||
|
||||
@@ -279,7 +279,7 @@ import {
|
||||
|
||||
import {
|
||||
percent, formatToken, StakingParameters, Validator, operatorAddressToAccount, consensusPubkeyToHexAddress, toDay, abbrMessage, abbrAddress,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import { keybase } from '@/libs/fetch'
|
||||
import StakingAddressComponent from './StakingAddressComponent.vue'
|
||||
import StakingCommissionComponent from './StakingCommissionComponent.vue'
|
||||
|
||||
@@ -65,7 +65,7 @@ import {
|
||||
} from 'bootstrap-vue'
|
||||
import {
|
||||
formatNumber, formatTokenAmount, getUserCurrency, isToken, percent, timeIn, toDay, toDuration, tokenFormatter,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
|
||||
import SummaryParmetersComponent from './SummaryParmetersComponent.vue'
|
||||
import SummaryAssetsComponent from './SummaryAssetsComponent.vue'
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<script>
|
||||
import { BTable, BCardTitle, BCard } from 'bootstrap-vue'
|
||||
import { formatNumber, formatTokenAmount, formatTokenDenom } from '@/libs/data'
|
||||
import { formatNumber, formatTokenAmount, formatTokenDenom } from '@/libs/utils'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
import {
|
||||
BCard, BTableSimple, BTr, BTd, BBadge, BCardBody,
|
||||
} from 'bootstrap-vue'
|
||||
import { toDay, tokenFormatter } from '@/libs/data'
|
||||
import { toDay, tokenFormatter } from '@/libs/utils'
|
||||
import ObjectFieldComponent from './ObjectFieldComponent.vue'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -67,7 +67,7 @@ import {
|
||||
|
||||
import {
|
||||
consensusPubkeyToHexAddress, getCachedValidators, timeIn, toDay,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -59,7 +59,7 @@ import {
|
||||
|
||||
import {
|
||||
getLocalChains, timeIn, toDay,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
|
||||
export default {
|
||||
name: 'Blocks',
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
import {
|
||||
BRow, BCol, VBTooltip,
|
||||
} from 'bootstrap-vue'
|
||||
import { consensusPubkeyToHexAddress, getCachedValidators } from '@/libs/data'
|
||||
import { consensusPubkeyToHexAddress, getCachedValidators } from '@/libs/utils'
|
||||
import UptimeMyChainBlocks from './UptimeMyChainBlocks.vue'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -370,7 +370,7 @@ import chainAPI from '@/libs/fetch'
|
||||
import {
|
||||
formatToken, formatTokenAmount, formatTokenDenom, getStakingValidatorOperator, percent, tokenFormatter, toDay,
|
||||
toDuration, abbrMessage, abbrAddress, getUserCurrency, getUserCurrencySign,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import ObjectFieldComponent from './ObjectFieldComponent.vue'
|
||||
import OperationTransferComponent from './OperationTransferComponent.vue'
|
||||
import OperationWithdrawComponent from './OperationWithdrawComponent.vue'
|
||||
|
||||
@@ -265,7 +265,7 @@ import { required } from '@validations'
|
||||
import store from '@/store'
|
||||
import {
|
||||
addressDecode, addressEnCode, getLedgerAddress, getLocalAccounts,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import { toHex } from '@cosmjs/encoding'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -279,7 +279,7 @@ import {
|
||||
chartColors,
|
||||
formatNumber,
|
||||
formatTokenAmount, formatTokenDenom, getLocalAccounts, getLocalChains, getUserCurrency, getUserCurrencySign, setUserCurrency,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||
import AppCollapse from '@core/components/app-collapse/AppCollapse.vue'
|
||||
import AppCollapseItem from '@core/components/app-collapse/AppCollapseItem.vue'
|
||||
|
||||
@@ -92,7 +92,7 @@ import {
|
||||
import Ripple from 'vue-ripple-directive'
|
||||
import {
|
||||
formatToken, getCachedValidators, getLocalAccounts, getLocalChains, tokenFormatter,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import FeatherIcon from '@/@core/components/feather-icon/FeatherIcon.vue'
|
||||
|
||||
import OperationWithdrawComponent from './OperationWithdrawComponent.vue'
|
||||
|
||||
@@ -55,5 +55,8 @@ export default {
|
||||
directives: {
|
||||
'b-tooltip': VBTooltip,
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -240,7 +240,7 @@ import {
|
||||
} from '@validations'
|
||||
import {
|
||||
formatToken, formatTokenDenom, getLocalAccounts, getUnitAmount, setLocalTxHistory, sign, timeIn,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||
import { coin } from '@cosmjs/amino'
|
||||
import { getChainConfigForSymbol } from '@/libs/osmos'
|
||||
|
||||
@@ -227,7 +227,7 @@ import {
|
||||
import FeatherIcon from '@core/components/feather-icon/FeatherIcon.vue'
|
||||
import {
|
||||
formatTokenAmount, getLocalAccounts, percent, setLocalTxHistory, sign,
|
||||
} from '@/libs/data'
|
||||
} from '@/libs/utils'
|
||||
import { getPairName } from '@/libs/osmos'
|
||||
import ToastificationContent from '@core/components/toastification/ToastificationContent.vue'
|
||||
import DepositeWindow from './DepositeWindow.vue'
|
||||
|
||||
Reference in New Issue
Block a user