check total

This commit is contained in:
Pham Tu 2024-01-26 11:03:01 +07:00
parent acfa292e91
commit 2d238018e1
No known key found for this signature in database
GPG Key ID: 7460FD99133ADA1C
2 changed files with 7 additions and 3 deletions

View File

@ -53,6 +53,7 @@ onMounted(() => {
if (connId.value) {
chainStore.rpc.getIBCConnectionsById(connId.value).then((x) => {
conn.value = x.connection;
console.log('getIBCConnectionsClientState', conn.value);
});
chainStore.rpc.getIBCConnectionsClientState(connId.value).then((x) => {
// @ts-ignore
@ -65,7 +66,6 @@ onMounted(() => {
)
);
}
console.log('getIBCConnectionsClientState', clientState.value);
});
chainStore.rpc.getIBCConnectionsChannels(connId.value).then((x) => {
channels.value = x.channels;
@ -426,13 +426,15 @@ function color(v: string) {
<Icon v-else icon="mdi-multiply" class="text-error text-lg" />
</div>
</td>
<td>{{ format.toLocaleDate(resp.timestamp) }}</td>
<td>
{{ resp.timestamp ? format.toLocaleDate(resp.timestamp) : '-' }}
</td>
</tr>
</tbody>
</table>
<PaginationBar
:limit="page.limit"
:total="txs.totalCount.toString()"
:total="txs?.totalCount?.toString()"
:callback="pageload"
/>
</div>

View File

@ -366,10 +366,12 @@ export const useFormatter = defineStore('formatter', {
},
toLocaleDate(time?: string | number | Date | Timestamp) {
if (!time) return '';
const timeValue =
typeof time === 'object' && 'seconds' in time
? fromTimestamp(time)
: time;
return new Date(timeValue).toLocaleString(navigator.language);
},
toDay(time?: string | number | Date | Timestamp, format = 'long') {