decode ibc packet

This commit is contained in:
BitcoinVM 2024-01-31 10:26:21 +08:00
parent 38d741ffee
commit f1fb43b935

View File

@ -23,7 +23,13 @@ if (props.hash) {
blockchain.rpc.getTx(props.hash).then((x) => (tx.value = x)); blockchain.rpc.getTx(props.hash).then((x) => (tx.value = x));
} }
const messages = computed(() => { const messages = computed(() => {
return tx.value.tx?.body?.messages || []; return tx.value.tx?.body?.messages.map(x=> {
if(x.packet?.data) {
// @ts-ignore
x.message = format.base64ToString(x.packet.data)
}
return x
}) || [];
}); });
</script> </script>
<template> <template>