Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

(Cherry-Pick)feat: Add rpc gw_get_pending_tx_hashes #506

Merged
merged 2 commits into from
Aug 29, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions packages/api-server/src/methods/modules/gw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ export class Gw {
this.is_request_in_queue.bind(this),
0
);
this.get_pending_tx_hashes = middleware(
this.get_pending_tx_hashes.bind(this),
0
);
}

async ping(args: any[]) {
Expand Down Expand Up @@ -676,6 +680,15 @@ export class Gw {
parseGwRpcError(error);
}
}

async get_pending_tx_hashes(args: any[]) {
try {
const result = await this.readonlyRpc.gw_get_pending_tx_hashes(...args);
return result;
} catch (error) {
parseGwRpcError(error);
}
}
}

function formatHexNumber(
Expand Down