Skip to content

Commit

Permalink
fix(connect): solana transaction decode
Browse files Browse the repository at this point in the history
  • Loading branch information
martykan committed Jan 16, 2025
1 parent dab03f5 commit 5cb1895
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/connect/src/api/solana/solanaUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,12 @@ export async function createTransactionShim(message: CompilableTransactionMessag
}

export async function createTransactionShimFromHex(rawTx: string) {
const { getBase16Encoder, getCompiledTransactionMessageDecoder, decompileTransactionMessage } =
await loadSolanaLib();
const { getBase16Encoder, getTransactionDecoder } = await loadSolanaLib();

const txByteArray = getBase16Encoder().encode(rawTx);
const compiledMessage = getCompiledTransactionMessageDecoder().decode(txByteArray);
const message = decompileTransactionMessage(compiledMessage);
const transaction = getTransactionDecoder().decode(txByteArray);

return createTransactionShim(message);
return createTransactionShimCommon(transaction);
}

const addPriorityFees = async <TMessage extends TransactionMessage>(
Expand Down

0 comments on commit 5cb1895

Please sign in to comment.