Skip to content

Commit

Permalink
Add missing encoding (#1988)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucia-w authored Jan 3, 2024
1 parent ef2569b commit a157265
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/rpc-graphql/src/loaders/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ async function loadTransaction(rpc: Rpc, { signature, ...config }: ReturnType<ty
// then fetch it again with `jsonParsed` encoding.
// This ensures the response always has the full transaction meta.
if (encoding !== 'jsonParsed') {
const jsonParsedConfig = { ...config, encoding: 'jsonParsed' };
const transactionJsonParsed = await rpc
.getTransaction(signature, config as unknown as Parameters<SolanaRpcMethods['getTransaction']>[1])
.getTransaction(signature, jsonParsedConfig as unknown as Parameters<SolanaRpcMethods['getTransaction']>[1])
.send()
.catch(e => {
throw e;
Expand Down

0 comments on commit a157265

Please sign in to comment.