fix all build checks

This commit is contained in:
liangping
2023-06-08 10:02:47 +08:00
parent e2782c1e00
commit a25dde89f5
18 changed files with 123 additions and 80 deletions
+1
View File
@@ -10,6 +10,7 @@ export const useBankStore = defineStore('bankstore', {
supply: {} as Coin,
balances: {} as Record<string, Coin[]>,
totalSupply: { supply: [] as Coin[] },
ibcDenoms: {} as Record<string, DenomTrace>
};
},
getters: {
+1 -1
View File
@@ -5,7 +5,7 @@ import {
type Endpoint,
EndpointType,
} from './useDashboard';
import type { VerticalNavItems } from '@/@layouts/types';
import type { VerticalNavItems } from '@/layouts/types';
import { useRouter } from 'vue-router';
import { CosmosRestClient } from '@/libs/client';
import {
+2 -1
View File
@@ -147,6 +147,7 @@ export const useFormatter = defineStore('formatter', {
}
const conf = mode === 'local'? this.blockchain.current?.assets?.find(
// @ts-ignore
(x) => x.base === token.denom || x.base.denom === token.denom
): this.findGlobalAssetConfig(token.denom)
@@ -226,7 +227,7 @@ export const useFormatter = defineStore('formatter', {
numberAndSign(input: number, fmt = '+0,0') {
return numeral(input).format(fmt);
},
toDay(time?: string, format = 'long') {
toDay(time?: string | number, format = 'long') {
if (!time) return '';
if (format === 'long') {
return dayjs(time).format('YYYY-MM-DD HH:mm');
+4 -4
View File
@@ -17,7 +17,7 @@ export const useWalletStore = defineStore('walletStore', {
balances: [] as Coin[],
delegations: [] as Delegation[],
unbonding: [] as UnbondingResponses[],
rewards: {} as DelegatorRewards,
rewards: {total: [], rewards: []} as DelegatorRewards,
walletIsConnected: {} as WalletConnected
};
},
@@ -28,7 +28,7 @@ export const useWalletStore = defineStore('walletStore', {
connectedWallet() {
const chainStore = useBlockchain();
const key = chainStore.defaultHDPath;
let connected = this.walletIsConnected
let connected = {} as WalletConnected
if (!this.walletIsConnected?.cosmosAddress){
connected = JSON.parse(localStorage.getItem(key) || '{}');
}
@@ -54,8 +54,9 @@ export const useWalletStore = defineStore('walletStore', {
},
rewardAmount() {
const stakingStore = useStakingStore();
// @ts-ignore
const reward = this.rewards.total?.find(
(x) => x.denom === stakingStore.params.bond_denom
(x: Coin) => x.denom === stakingStore.params.bond_denom
);
return reward || { amount: '0', denom: stakingStore.params.bond_denom };
},
@@ -125,7 +126,6 @@ export const useWalletStore = defineStore('walletStore', {
console.log(key, 'key')
console.log(localStorage.getItem(key))
localStorage.removeItem(key);
this.walletIsConnected = null
this.$reset()
},
setConnectedWallet(value: any) {