Skip to content

Commit

Permalink
Merge branch 'fix/1424-ensuring-string' of https://github.com/vechain…
Browse files Browse the repository at this point in the history
…/vechain-sdk-js into fix/1424-ensuring-string
  • Loading branch information
freemanzMrojo committed Nov 21, 2024
2 parents 39f6203 + 158d055 commit e18f275
Show file tree
Hide file tree
Showing 11 changed files with 666 additions and 604 deletions.
4 changes: 2 additions & 2 deletions apps/sdk-hardhat-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
"@nomicfoundation/hardhat-ethers": "^3.0.8",
"@nomicfoundation/hardhat-network-helpers": "^1.0.0",
"@nomicfoundation/hardhat-toolbox": "^4.0.0",
"@nomicfoundation/hardhat-verify": "^2.0.10",
"@nomicfoundation/hardhat-verify": "^2.0.12",
"@typechain/ethers-v6": "^0.5.0",
"@typechain/hardhat": "^9.0.0",
"@types/chai": "^4.2.0",
"@types/mocha": ">=9.1.0",
"@types/mocha": ">=10.0.9",
"chai": "^4.2.0",
"hardhat": "^2.22.15",
"hardhat-gas-reporter": "^1.0.8",
Expand Down
2 changes: 1 addition & 1 deletion apps/sdk-vite-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"@vitest/browser": "^2.1.4",
"@vitest/browser": "^2.1.5",
"eslint": "^9.13.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"prettier": "^3.3.3",
"ts-jest": "^29.2.5",
"tsup": "^8.3.0",
"turbo": "^2.2.3",
"turbo": "^2.3.0",
"typedoc": "^0.26.8",
"typedoc-plugin-missing-exports": "^3.0.0",
"typescript": "^5.6.3",
Expand Down
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 e18f275

Please sign in to comment.