refactor
This commit is contained in:
parent
53bc4dbdf9
commit
af9f1cac45
@ -110,11 +110,18 @@
|
||||
|
||||
<b-dropdown-item :to="`/${selected_chain.chain_name}/uptime/my`">
|
||||
<feather-icon
|
||||
icon="SettingsIcon"
|
||||
icon="AirplayIcon"
|
||||
size="16"
|
||||
/>
|
||||
<span class="align-middle ml-50">My Validators</span>
|
||||
</b-dropdown-item>
|
||||
<b-dropdown-item :to="`/wallet/transactions`">
|
||||
<feather-icon
|
||||
icon="LayersIcon"
|
||||
size="16"
|
||||
/>
|
||||
<span class="align-middle ml-50">My Transactions</span>
|
||||
</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</b-navbar-nav>
|
||||
</div>
|
||||
@ -131,7 +138,7 @@ import Locale from '@core/layouts/components/app-navbar/components/Locale.vue'
|
||||
import SearchBar from '@core/layouts/components/app-navbar/components/SearchBar.vue'
|
||||
// import CartDropdown from '@core/layouts/components/app-navbar/components/CartDropdown.vue'
|
||||
import store from '@/store'
|
||||
import { getLocalAccounts, timeIn, toDay } from '@/libs/data'
|
||||
import { getLocalAccounts, timeIn, toDay } from '@/libs/utils'
|
||||
// import UserDropdown from '@core/layouts/components/app-navbar/components/UserDropdown.vue'
|
||||
|
||||
export default {
|
||||
|
@ -10,6 +10,5 @@ export { default as Block } from './block'
|
||||
export { default as ValidatorDistribution } from './validator-distribution'
|
||||
export { default as StakingDelegation } from './staking-delegation'
|
||||
export { default as WrapStdTx } from './wrapstdtx'
|
||||
export * from './data'
|
||||
|
||||
export default class Test {}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { percent } from './data'
|
||||
import { percent } from '../utils'
|
||||
|
||||
export default class ProposalTally {
|
||||
constructor() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import compareVersions from 'compare-versions'
|
||||
import { toDay, formatToken } from './data'
|
||||
import { toDay, formatToken } from '../utils'
|
||||
import ProposalTally from './proposal-tally'
|
||||
|
||||
export default class Proposal {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { percent } from './data'
|
||||
import { percent } from '../utils'
|
||||
|
||||
export default class StakingPool {
|
||||
constructor() {
|
||||
|
@ -7,7 +7,7 @@ import { toBase64 } from '@cosmjs/encoding'
|
||||
import {
|
||||
Proposal, ProposalTally, Proposer, StakingPool, Votes, Deposit,
|
||||
Validator, StakingParameters, Block, ValidatorDistribution, StakingDelegation, WrapStdTx, getUserCurrency,
|
||||
} from './data'
|
||||
} from './utils'
|
||||
import OsmosAPI from './osmos'
|
||||
|
||||
function commonProcess(res) {
|
||||
|
@ -8,7 +8,7 @@
|
||||
import { sha256 } from '@cosmjs/crypto'
|
||||
import { toHex } from '@cosmjs/encoding'
|
||||
import fetch from 'node-fetch'
|
||||
import { formatTokenDenom, getLocalChains } from './data/data'
|
||||
import { formatTokenDenom, getLocalChains } from './utils'
|
||||
|
||||
export const poolIds = {
|
||||
1: true,
|
||||
|
@ -16,7 +16,7 @@ import RIPEMD160 from 'ripemd160'
|
||||
import localeData from 'dayjs/plugin/localeData'
|
||||
import { $themeColors } from '@themeConfig'
|
||||
// import { SigningStargateClient } from '@cosmjs/stargate'
|
||||
import PingWalletClient from './signing'
|
||||
import PingWalletClient from './data/signing'
|
||||
|
||||
dayjs.extend(localeData)
|
||||
dayjs.extend(duration)
|
||||
@ -415,6 +415,7 @@ export function getStakingValidatorOperator(chainName, addr, length = -1) {
|
||||
|
||||
export * from 'compare-versions'
|
||||
|
||||
export * from './data'
|
||||
export class Data {
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import store from '@/store'
|
||||
import { isTestnet } from '../../libs/data/data'
|
||||
import { isTestnet } from '../../libs/utils'
|
||||
|
||||
const modules = [
|
||||
{
|
||||
|
@ -114,17 +114,17 @@ const router = new VueRouter({
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/wallet/helping',
|
||||
name: 'helping',
|
||||
component: () => import('@/views/WalletHelping.vue'),
|
||||
path: '/wallet/transactions',
|
||||
name: 'mytransactions',
|
||||
component: () => import('@/views/WalletTransactions.vue'),
|
||||
meta: {
|
||||
pageTitle: 'Help Ping.pub',
|
||||
pageTitle: 'Transaction History',
|
||||
breadcrumb: [
|
||||
{
|
||||
text: 'Wallet',
|
||||
},
|
||||
{
|
||||
text: 'Help Ping.pub',
|
||||
text: 'Transaction History',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -5,7 +5,7 @@
|
||||
* @LastEditors: dingyiming
|
||||
* @LastEditTime: 2021-11-20 15:33:07
|
||||
*/
|
||||
import { isTestnet } from '@/libs/data/data'
|
||||
import { isTestnet } from '@/libs/utils'
|
||||
|
||||
let chains = {}
|
||||
|
||||
|
@ -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',
|
||||
|
@ -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 {
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user