diff --git a/src/screens/SignTxEmbed.tsx b/src/screens/SignTxEmbed.tsx index 60cfc15..e6bdfa5 100644 --- a/src/screens/SignTxEmbed.tsx +++ b/src/screens/SignTxEmbed.tsx @@ -133,8 +133,10 @@ export const SignTxEmbed = () => { // Balance Check // Use a temporary read-only client for balance + const { privKey } = await getPathKey(`${network.namespace}:${network.chainId}`, account.index) + const tempWallet = await DirectSecp256k1Wallet.fromKey( - new Uint8Array(Buffer.from((await getPathKey(`${network.namespace}:${network.chainId}`, account.index)).privKey.replace(/^0x/, ''), 'hex')), + new Uint8Array(Buffer.from(privKey.replace(/^0x/, ''), 'hex')), network.addressPrefix ); @@ -222,6 +224,7 @@ export const SignTxEmbed = () => { try { const { privKey } = await getPathKey(`${requestedNetwork.namespace}:${chainId}`, account.index); + const privateKeyBytes = Buffer.from(privKey.replace(/^0x/, ''), 'hex'); const wallet = await DirectSecp256k1Wallet.fromKey(new Uint8Array(privateKeyBytes), requestedNetwork.addressPrefix); // Wrap in Uint8Array @@ -370,7 +373,7 @@ export const SignTxEmbed = () => { disabled={isTxLoading} style={{ marginTop: 10 }} > - Reject + Reject