Skip to content

Commit 7a59188

Browse files
izadimrantanIzad Imran Tan
andauthored
🤖 Merge PR DefinitelyTyped#71830 Changed input type for Block object functions and changed Response object (zetrix-sdk-nodejs) by @izadimrantan
Co-authored-by: Izad Imran Tan <[email protected]>
1 parent 3686cb7 commit 7a59188

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

‎types/zetrix-sdk-nodejs/index.d.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,19 @@ declare namespace ZtxChainSDK {
5959

6060
checkStatus(): Response;
6161

62-
getTransactions(blockNumber: number): Response;
62+
getTransactions(blockNumber: string): Response;
6363

64-
getInfo(blockNumber: number): Response;
64+
getInfo(blockNumber: string): Response;
6565

6666
getLatestInfo(): Response;
6767

68-
getValidators(blockNumber: number): Response;
68+
getValidators(blockNumber: string): Response;
6969

7070
getLatestValidators(): Response;
7171

7272
getLatestReward(): Response;
7373

74-
getFees(blockNumber: number): Response;
74+
getFees(blockNumber: string): Response;
7575

7676
getLatestFees(): Response;
7777
}
@@ -115,6 +115,7 @@ declare namespace ZtxChainSDK {
115115

116116
interface Response {
117117
result: any;
118-
error: any;
118+
errorCode: any;
119+
errorDesc: any;
119120
}
120121
}

‎types/zetrix-sdk-nodejs/zetrix-sdk-nodejs-tests.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ const tokenInfo: ZtxChainSDK.Response = token.getInfo({});
3333
const block: ZtxChainSDK.Block = sdk.block;
3434
const blockNumber: ZtxChainSDK.Response = block.getNumber();
3535
const blockStatus: ZtxChainSDK.Response = block.checkStatus();
36-
const blockTransactions: ZtxChainSDK.Response = block.getTransactions(1);
37-
const blockInfo: ZtxChainSDK.Response = block.getInfo(1);
36+
const blockTransactions: ZtxChainSDK.Response = block.getTransactions("1");
37+
const blockInfo: ZtxChainSDK.Response = block.getInfo("1");
3838
const latestBlockInfo: ZtxChainSDK.Response = block.getLatestInfo();
39-
const validators: ZtxChainSDK.Response = block.getValidators(1);
39+
const validators: ZtxChainSDK.Response = block.getValidators("1");
4040
const latestValidators: ZtxChainSDK.Response = block.getLatestValidators();
4141
const latestReward: ZtxChainSDK.Response = block.getLatestReward();
42-
const fees: ZtxChainSDK.Response = block.getFees(1);
42+
const fees: ZtxChainSDK.Response = block.getFees("1");
4343
const latestFees: ZtxChainSDK.Response = block.getLatestFees();
4444

4545
// Test Operation interface

0 commit comments

Comments
 (0)