diff --git a/src/components/dynamic/TxsElement.vue b/src/components/dynamic/TxsElement.vue index 60229564..d90acd04 100644 --- a/src/components/dynamic/TxsElement.vue +++ b/src/components/dynamic/TxsElement.vue @@ -9,12 +9,10 @@ const props = defineProps({ }); const txs = computed(() => { - return ( - props.value?.map((x) => ({ - hash: hashTx(fromBase64(x)), - tx: decodeTxRaw(fromBase64(x)), - })) || [] - ); + return props.value?.map((x) => ({ + hash: hashTx(fromBase64(x)), + tx: decodeTxRaw(fromBase64(x)), + })) || [] }); const format = useFormatter(); diff --git a/src/stores/useBaseStore.ts b/src/stores/useBaseStore.ts index 049c733c..7641dd13 100644 --- a/src/stores/useBaseStore.ts +++ b/src/stores/useBaseStore.ts @@ -61,7 +61,7 @@ export const useBaseStore = defineStore('baseStore', { } }) ); - return txs; + return txs.sort((a, b) => {return Number(b.height) - Number(a.height)}); }, }, actions: {