Skip to content

Commit

Permalink
Merge branch 'main' into dependabot-npm_and_yarn-nomicfoundation-hard…
Browse files Browse the repository at this point in the history
…hat-verify-2.0.12
  • Loading branch information
fabiorigam authored Nov 20, 2024
2 parents af556cd + 42cb251 commit 62cbd17
Show file tree
Hide file tree
Showing 8 changed files with 529 additions and 529 deletions.
2 changes: 1 addition & 1 deletion packages/aws-kms-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"test:unit": "rm -rf ./coverageUnit && UNIT=true jest --coverage --coverageDirectory=coverageUnit --group=unit"
},
"dependencies": {
"@aws-sdk/client-kms": "^3.682.0",
"@aws-sdk/client-kms": "^3.696.0",
"@noble/curves": "^1.6.0",
"@vechain/sdk-core": "1.0.0-rc.3",
"@vechain/sdk-errors": "1.0.0-rc.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { ThorId } from '@vechain/sdk-core';
*/
const ethGetUncleByBlockHashAndIndex = async (
params: unknown[]
): Promise<object> => {
): Promise<object | null> => {
// Input validation
if (
params.length !== 2 ||
Expand All @@ -33,7 +33,7 @@ const ethGetUncleByBlockHashAndIndex = async (
{ params }
);

return await Promise.resolve({});
return await Promise.resolve(null);
};

export { ethGetUncleByBlockHashAndIndex };
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { JSONRPCInvalidParams } from '@vechain/sdk-errors';
*/
const ethGetUncleByBlockNumberAndIndex = async (
params: unknown[]
): Promise<object> => {
): Promise<object | null> => {
// Input validation
if (
params.length !== 2 ||
Expand All @@ -32,7 +32,7 @@ const ethGetUncleByBlockNumberAndIndex = async (
{ params }
);

return await Promise.resolve({});
return await Promise.resolve(null);
};

export { ethGetUncleByBlockNumberAndIndex };
4 changes: 2 additions & 2 deletions packages/network/src/provider/utils/rpc-mapper/rpc-mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,13 @@ const RPCMethodsMap = (

[RPC_METHODS.eth_getUncleByBlockHashAndIndex]: async (
params
): Promise<object> => {
): Promise<object | null> => {
return await ethGetUncleByBlockHashAndIndex(params);
},

[RPC_METHODS.eth_getUncleByBlockNumberAndIndex]: async (
params
): Promise<object> => {
): Promise<object | null> => {
return await ethGetUncleByBlockNumberAndIndex(params);
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('RPC Mapper - eth_getUncleByBlockHashAndIndex method tests', () => {
'0x0'
]);

expect(uncleBlock).toStrictEqual({});
expect(uncleBlock).toStrictEqual(null);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('RPC Mapper - eth_getUncleByBlockNumberAndIndex method tests', () => {
RPC_METHODS.eth_getUncleByBlockNumberAndIndex
](['latest', '0x0']);

expect(uncleBlock).toStrictEqual({});
expect(uncleBlock).toStrictEqual(null);
});
});

Expand Down
4 changes: 2 additions & 2 deletions packages/rpc-proxy/tests/e2e_rpc_proxy.solo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ describe('RPC Proxy endpoints', () => {
console.log(response.data);
expect(response.data).toHaveProperty('result');
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(response.data.result).toStrictEqual({});
expect(response.data.result).toBeNull();
});

it('eth_getUncleByBlockNumberAndIndex method call', async () => {
Expand All @@ -532,7 +532,7 @@ describe('RPC Proxy endpoints', () => {
console.log(response.data);
expect(response.data).toHaveProperty('result');
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(response.data.result).toStrictEqual({});
expect(response.data.result).toBeNull();
});

it('eth_requestAccounts method call', async () => {
Expand Down
Loading

0 comments on commit 62cbd17

Please sign in to comment.