From 1d30f8371e2f6e3497f90df48533abfe3980f82b Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Fri, 2 May 2025 10:11:13 +0530 Subject: [PATCH] Fix decoding cosmos pubkey --- src/screens/SendTxEmbed.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/screens/SendTxEmbed.tsx b/src/screens/SendTxEmbed.tsx index 1a56fe8..b17010d 100644 --- a/src/screens/SendTxEmbed.tsx +++ b/src/screens/SendTxEmbed.tsx @@ -7,7 +7,7 @@ import { import JSONbig from 'json-bigint'; import { AuthInfo, SignDoc } from "cosmjs-types/cosmos/tx/v1beta1/tx"; -import { DirectSecp256k1Wallet, Algo, TxBodyEncodeObject } from '@cosmjs/proto-signing'; +import { DirectSecp256k1Wallet, Algo, TxBodyEncodeObject, decodeOptionalPubkey } from '@cosmjs/proto-signing'; import { SigningStargateClient } from '@cosmjs/stargate'; import { toHex } from '@cosmjs/encoding'; @@ -296,12 +296,7 @@ export const SendTxEmbed = () => { ...AuthInfo.decode(transactionDetails.signDoc.authInfoBytes), signerInfos: AuthInfo.decode(transactionDetails.signDoc.authInfoBytes).signerInfos.map((info) => ({ ...info, - publicKey: info.publicKey - ? { - ...info.publicKey, - value: toHex(info.publicKey.value), - } - : undefined, + publicKey: decodeOptionalPubkey(info.publicKey) })), }, null,