Skip to content

Commit

Permalink
add id inside tests, nits
Browse files Browse the repository at this point in the history
  • Loading branch information
tibi77 committed Apr 27, 2024
1 parent 5f9e13c commit 72118e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/rpc-graphql/src/__tests__/transaction-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ describe('transaction', () => {
const source = /* GraphQL */ `
query testQuery($signature: Signature!) {
transaction(signature: $signature) {
ID
blockTime
id
slot
}
}
Expand All @@ -68,13 +68,13 @@ describe('transaction', () => {
expect(result).toMatchObject({
data: {
transaction: {
ID: expect.any(signature),
blockTime: expect.any(BigInt),
id: expect.any(String),
slot: expect.any(BigInt),
},
},
});
expect(result?.data?.transaction?.id).toBe(signature);
expect(result?.data?.transaction?.ID).toBe(signature);
});
it("can query a transaction's computeUnitsConsumed from it's meta", async () => {
expect.assertions(1);
Expand Down
1 change: 1 addition & 0 deletions packages/rpc-graphql/src/resolvers/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export function resolveTransaction(fieldName?: string) {
const loadedTransactions = await context.loaders.transaction.loadMany(argsSet);

let result: TransactionResult = {
ID: signature,
encodedData: {},
signature,
};
Expand Down

0 comments on commit 72118e2

Please sign in to comment.