Skip to content

Commit

Permalink
Merge pull request #2 from oraichain/fix/staking-cosmos
Browse files Browse the repository at this point in the history
Fix: change txHash from base64 to hex to be queried
  • Loading branch information
ledanghuy1811 authored Oct 7, 2024
2 parents 6346190 + c58a8f9 commit 1ce1eb2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/components/TxDialog/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { sha256 } from '@cosmjs/crypto';
import { toAscii, fromAscii, toBase64 } from '@cosmjs/encoding';
import { toAscii, fromAscii, toHex } from '@cosmjs/encoding';
import { ref, computed } from 'vue';
import {
getAccount,
Expand Down Expand Up @@ -247,7 +247,8 @@ async function sendTx() {
const response = await client.broadcastTx(props.endpoint, txRaw);
if (!response) return;
// show submitting view
hash.value = toBase64(response.hash);
hash.value = toHex(response.hash);
showResult(hash.value);
emit('submited', {
Expand Down Expand Up @@ -294,6 +295,7 @@ function fetchTx(tx: string) {
step.value += 20;
getTxByHash(props.endpoint, tx)
.then((res) => {
console.log("res: ", res)
step.value = 100;
if (res.txResponse!.code > 0) {
error.value = res.txResponse?.rawLog ?? '';
Expand Down

0 comments on commit 1ce1eb2

Please sign in to comment.