Skip to content

Commit dd46235

Browse files
authored
Improve getGasInfo() type safety (#16)
- Change return type from Promise<any> to Promise<GasInfo> - Provides better TypeScript type checking for gas pricing data - Path already updated to /api/v1/network/gas in Issue #7 - GasInfo interface already defined in types.ts Fixes #10
1 parent 7969d51 commit dd46235

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/zhtp-api-methods.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,8 @@ export abstract class ZhtpApiMethods extends ZhtpApiCore {
595595
return this.request<any>('/api/v1/blockchain/status');
596596
}
597597

598-
async getGasInfo(): Promise<any> {
599-
return this.request<any>('/api/v1/network/gas');
598+
async getGasInfo(): Promise<GasInfo> {
599+
return this.request<GasInfo>('/api/v1/network/gas');
600600
}
601601

602602
async getNodeStatus(): Promise<NodeStatus> {

0 commit comments

Comments
 (0)