Skip to content

Commit dbd01f2

Browse files
committed
Merge remote-tracking branch 'origin/feat/prettier' into feat/prettier
2 parents 21a50c1 + 63abc74 commit dbd01f2

35 files changed

+543
-147
lines changed

index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
</div>
2727
<script type="module" src="/src/main.ts"></script>
2828
<!-- Google tag (gtag.js) -->
29-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-SSBKVF3GMX"></script>
29+
<script
30+
async
31+
src="https://www.googletagmanager.com/gtag/js?id=G-SSBKVF3GMX"
32+
></script>
3033
<script>
3134
window.dataLayer = window.dataLayer || [];
3235
function gtag() {

src/components/ProposalListItem.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ function metaItem(metadata: string | undefined): { title: string; summary: strin
5858
:to="`/${chain.chainName}/gov/${item?.proposal_id}`"
5959
class="text-main text-base mb-1 block hover:text-indigo-400 truncate"
6060
>
61-
{{ item?.content?.title || item?.title || metaItem(item?.metadata)?.title }}
61+
{{
62+
item?.content?.title ||
63+
item?.title ||
64+
metaItem(item?.metadata)?.title
65+
}}
6266
</RouterLink>
6367
<div
6468
v-if="item.content"

src/components/WasmVerification.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ function callFunction(title: string, method: string, arg: Argument) {
176176
} else {
177177
// QueryMsg
178178
wasmStore.wasmClient
179-
.getWasmContractSmartQuery(props.contract, `{"${method}": ${JSON.stringify(args)}}`)
179+
.getWasmContractSmartQuery(
180+
props.contract,
181+
`{"${method}": ${JSON.stringify(args)}}`
182+
)
180183
.then((x) => {
181184
result.value[`${title}-${method}`] = x;
182185
})

src/components/dynamic/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ function selectObject(v: Object, direct?: string) {
3131
return UInt8Array;
3232
case Array.isArray(v):
3333
return ArrayElement;
34-
case v && Object.keys(v).includes('amount') && Object.keys(v).includes('denom'): {
34+
case v &&
35+
Object.keys(v).includes('amount') &&
36+
Object.keys(v).includes('denom'): {
3537
return TokenElement;
3638
}
3739
case direct === 'horizontal':

src/layouts/components/DefaultLayout.vue

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ import { useBaseStore, useBlockchain } from '@/stores';
1414
1515
import NavBarI18n from './NavBarI18n.vue';
1616
import NavBarWallet from './NavBarWallet.vue';
17-
import type { NavGroup, NavLink, NavSectionTitle, VerticalNavItems } from '../types';
17+
import type {
18+
NavGroup,
19+
NavLink,
20+
NavSectionTitle,
21+
VerticalNavItems,
22+
} from '../types';
1823
import dayjs from 'dayjs';
1924
import AdBanner from '@/components/ad/AdBanner.vue';
2025
@@ -89,7 +94,10 @@ const show_ad = computed(() => {
8994
<img class="w-10 h-10" src="../../assets/logo.svg" />
9095
<h1 class="flex-1 ml-3 text-2xl font-semibold dark:text-white">Ping.pub</h1>
9196
</RouterLink>
92-
<div class="pr-4 cursor-pointer xl:!hidden" @click="sidebarShow = false">
97+
<div
98+
class="pr-4 cursor-pointer xl:!hidden"
99+
@click="sidebarShow = false"
100+
>
93101
<Icon icon="mdi-close" class="text-2xl" />
94102
</div>
95103
</div>
@@ -121,7 +129,11 @@ const show_ad = computed(() => {
121129
<div class="text-base capitalize flex-1 text-gray-700 dark:text-gray-200 whitespace-nowrap">
122130
{{ item?.title }}
123131
</div>
124-
<div v-if="item?.badgeContent" class="mr-6 badge badge-sm text-white border-none" :class="item?.badgeClass">
132+
<div
133+
v-if="item?.badgeContent"
134+
class="mr-6 badge badge-sm text-white border-none"
135+
:class="item?.badgeClass"
136+
>
125137
{{ item?.badgeContent }}
126138
</div>
127139
</div>
@@ -201,11 +213,18 @@ const show_ad = computed(() => {
201213
<div class="text-base capitalize flex-1 text-gray-700 dark:text-gray-200 whitespace-nowrap">
202214
{{ item?.title }}
203215
</div>
204-
<div v-if="item?.badgeContent" class="badge badge-sm text-white border-none" :class="item?.badgeClass">
216+
<div
217+
v-if="item?.badgeContent"
218+
class="badge badge-sm text-white border-none"
219+
:class="item?.badgeClass"
220+
>
205221
{{ item?.badgeContent }}
206222
</div>
207223
</RouterLink>
208-
<div v-if="isNavTitle(item)" class="px-4 text-sm text-gray-400 pb-2 uppercase">
224+
<div
225+
v-if="isNavTitle(item)"
226+
class="px-4 text-sm text-gray-400 pb-2 uppercase"
227+
>
209228
{{ item?.heading }}
210229
</div>
211230
</div>
@@ -218,7 +237,10 @@ const show_ad = computed(() => {
218237
<Icon icon="mdi:frequently-asked-questions" class="text-xl mr-2" />
219238
<div class="text-base capitalize flex-1 text-gray-600 dark:text-gray-200">Wallet Helper</div>
220239
</RouterLink>
221-
<div v-if="showDiscord" class="px-4 text-sm pt-2 text-gray-400 pb-2 uppercase">
240+
<div
241+
v-if="showDiscord"
242+
class="px-4 text-sm pt-2 text-gray-400 pb-2 uppercase"
243+
>
222244
{{ $t('module.sponsors') }}
223245
</div>
224246
<Sponsors v-if="showDiscord" />
@@ -252,8 +274,13 @@ const show_ad = computed(() => {
252274
</div>
253275
<div class="xl:!ml-64 px-3 pt-4">
254276
<!-- header -->
255-
<div class="flex items-center py-3 bg-base-100 mb-4 rounded px-4 sticky top-0 z-10">
256-
<div class="text-2xl pr-3 cursor-pointer xl:!hidden" @click="sidebarShow = true">
277+
<div
278+
class="flex items-center py-3 bg-base-100 mb-4 rounded px-4 sticky top-0 z-10"
279+
>
280+
<div
281+
class="text-2xl pr-3 cursor-pointer xl:!hidden"
282+
@click="sidebarShow = true"
283+
>
257284
<Icon icon="mdi-menu" />
258285
</div>
259286

@@ -285,7 +312,11 @@ const show_ad = computed(() => {
285312
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
286313
></path>
287314
</svg>
288-
<span>{{ $t('pages.out_of_sync') }} {{ blocktime.format() }} ({{ blocktime.fromNow() }})</span>
315+
<span
316+
>{{ $t('pages.out_of_sync') }} {{ blocktime.format() }} ({{
317+
blocktime.fromNow()
318+
}})</span
319+
>
289320
</div>
290321
</div>
291322
<RouterView v-slot="{ Component }">

src/layouts/components/NavBarWallet.vue

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,22 @@ const params = computed(() => {
4747

4848
<template>
4949
<div class="dropdown dropdown-hover dropdown-end">
50-
<label tabindex="0" class="btn btn-sm btn-primary m-1 lowercase truncate !inline-flex text-xs md:!text-sm">
50+
<label
51+
tabindex="0"
52+
class="btn btn-sm btn-primary m-1 lowercase truncate !inline-flex text-xs md:!text-sm"
53+
>
5154
<Icon icon="mdi:wallet" />
5255
<span class="ml-1 hidden md:block"> {{ walletStore.shortAddress || 'Wallet' }}</span>
5356
</label>
54-
<div tabindex="0" class="dropdown-content menu shadow p-2 bg-base-100 rounded w-52 md:!w-64 overflow-auto">
55-
<label v-if="!walletStore?.currentAddress" for="PingConnectWallet" class="btn btn-sm btn-primary">
57+
<div
58+
tabindex="0"
59+
class="dropdown-content menu shadow p-2 bg-base-100 rounded w-52 md:!w-64 overflow-auto"
60+
>
61+
<label
62+
v-if="!walletStore?.currentAddress"
63+
for="PingConnectWallet"
64+
class="btn btn-sm btn-primary"
65+
>
5666
<Icon icon="mdi:wallet" /><span class="ml-1 block">Connect Wallet</span>
5767
</label>
5868
<div class="px-2 mb-1 text-gray-500 dark:text-gray-400 font-semibold">
@@ -69,10 +79,18 @@ const params = computed(() => {
6979
</a>
7080
<div class="divider mt-1 mb-1"></div>
7181
<RouterLink to="/wallet/accounts">
72-
<div class="block py-2 px-2 hover:!bg-gray-100 rounded cursor-pointer">Accounts</div>
82+
<div
83+
class="block py-2 px-2 hover:!bg-gray-100 rounded cursor-pointer"
84+
>
85+
Accounts
86+
</div>
7387
</RouterLink>
7488
<RouterLink to="/wallet/portfolio">
75-
<div class="block py-2 px-2 hover:!bg-gray-100 rounded cursor-pointer">Portfolio</div>
89+
<div
90+
class="block py-2 px-2 hover:!bg-gray-100 rounded cursor-pointer"
91+
>
92+
Portfolio
93+
</div>
7694
</RouterLink>
7795
<div v-if="walletStore.currentAddress" class="divider mt-1 mb-1"></div>
7896
<a

src/libs/address.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ export function consumerKeyToBase64Address(consumerKey?: Record<string, string>)
4545

4646
if (consumerKey.secp256k1) {
4747
const pubkey = fromBase64(consumerKey.secp256k1);
48-
if (pubkey) return toBase64(new Ripemd160().update(sha256(pubkey)).digest());
48+
if (pubkey)
49+
return toBase64(new Ripemd160().update(sha256(pubkey)).digest());
4950
}
5051
return raw;
5152
}

src/libs/api/customization/xion.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ export function proposalAdapter(p: any): GovProposal {
2525

2626
// xion custom request
2727
export const requests: Partial<RequestRegistry> = {
28-
bank_supply_by_denom: { url: '/cosmos/bank/v1beta1/supply/by_denom?denom={denom}', adapter },
28+
bank_supply_by_denom: {
29+
url: '/cosmos/bank/v1beta1/supply/by_denom?denom={denom}',
30+
adapter,
31+
},
2932
gov_params_voting: { url: '/cosmos/gov/v1/params/voting', adapter },
3033
gov_params_tally: { url: '/cosmos/gov/v1/params/tallying', adapter },
3134
gov_params_deposit: { url: '/cosmos/gov/v1/params/deposit', adapter },

src/libs/api/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ export const DEFAULT: RequestRegistry = {
77
url: '/cosmos/auth/v1beta1/accounts/{address}',
88
adapter,
99
},
10-
params: { url: '/cosmos/params/v1beta1/params?subspace={subspace}&key={key}', adapter },
10+
params: {
11+
url: '/cosmos/params/v1beta1/params?subspace={subspace}&key={key}',
12+
adapter,
13+
},
1114
bank_params: { url: '/cosmos/bank/v1beta1/params', adapter },
1215
bank_balances_address: {
1316
url: '/cosmos/bank/v1beta1/balances/{address}',

src/modules/[chain]/account/[address].vue

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,9 @@ function mapAmount(events: { type: string; attributes: { key: string; value: str
219219
<div class="text-sm font-semibold">
220220
{{ format.formatToken(rewardItem) }}
221221
</div>
222-
<div class="text-xs">{{ format.calculatePercent(rewardItem.amount, totalAmount) }}</div>
222+
<div class="text-xs">
223+
{{ format.calculatePercent(rewardItem.amount, totalAmount) }}
224+
</div>
223225
</div>
224226
<div class="text-xs truncate relative py-1 px-3 rounded-full w-fit text-primary dark:invert mr-2">
225227
<span class="inset-x-0 inset-y-0 opacity-10 absolute bg-primary dark:invert text-sm"></span>${{
@@ -257,7 +259,9 @@ function mapAmount(events: { type: string; attributes: { key: string; value: str
257259
</div>
258260
</div>
259261
</div>
260-
<div class="mt-4 text-lg font-semibold mr-5 pl-5 border-t pt-4 text-right">
262+
<div
263+
class="mt-4 text-lg font-semibold mr-5 pl-5 border-t pt-4 text-right"
264+
>
261265
{{ $t('account.total_value') }}: ${{ totalValue }}
262266
</div>
263267
</div>
@@ -436,12 +440,17 @@ function mapAmount(events: { type: string; attributes: { key: string; value: str
436440
</tr>
437441
<tr v-for="(v, index) in txs" :key="index">
438442
<td class="text-sm py-3">
439-
<RouterLink :to="`/${chain}/block/${v.height}`" class="text-primary dark:invert">{{
440-
v.height
441-
}}</RouterLink>
443+
<RouterLink
444+
:to="`/${chain}/block/${v.height}`"
445+
class="text-primary dark:invert"
446+
>{{ v.height }}</RouterLink
447+
>
442448
</td>
443449
<td class="truncate py-3" style="max-width: 200px">
444-
<RouterLink :to="`/${chain}/tx/${v.txhash}`" class="text-primary dark:invert">
450+
<RouterLink
451+
:to="`/${chain}/tx/${v.txhash}`"
452+
class="text-primary dark:invert"
453+
>
445454
{{ v.txhash }}
446455
</RouterLink>
447456
</td>
@@ -483,12 +492,17 @@ function mapAmount(events: { type: string; attributes: { key: string; value: str
483492
</tr>
484493
<tr v-for="(v, index) in recentReceived" :key="index">
485494
<td class="text-sm py-3">
486-
<RouterLink :to="`/${chain}/block/${v.height}`" class="text-primary dark:invert">{{
487-
v.height
488-
}}</RouterLink>
495+
<RouterLink
496+
:to="`/${chain}/block/${v.height}`"
497+
class="text-primary dark:invert"
498+
>{{ v.height }}</RouterLink
499+
>
489500
</td>
490501
<td class="truncate py-3" style="max-width: 200px">
491-
<RouterLink :to="`/${chain}/tx/${v.txhash}`" class="text-primary dark:invert">
502+
<RouterLink
503+
:to="`/${chain}/tx/${v.txhash}`"
504+
class="text-primary dark:invert"
505+
>
492506
{{ v.txhash }}
493507
</RouterLink>
494508
</td>

0 commit comments

Comments
 (0)