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

Commit

Permalink
Merge pull request #124 from nervosnetwork/add-get-last-submitted-info
Browse files Browse the repository at this point in the history
feat: Add gw_get_last_submitted_info
  • Loading branch information
RetricSu authored Dec 22, 2021
2 parents 993e0bf + 98303bd commit 535f589
Showing 1 changed file with 13 additions and 0 deletions.
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 @@ -58,6 +58,10 @@ export class Gw {
this.submit_withdrawal_request.bind(this),
0
);
this.get_last_submitted_info = middleware(
this.get_last_submitted_info.bind(this),
0
);
}

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

async get_last_submitted_info(args: any[]) {
try {
const result = await this.rpc.gw_get_last_submitted_info(...args);
return result;
} catch (error) {
parseGwRpcError(error);
}
}
}

function formatHexNumber(
Expand Down

0 comments on commit 535f589

Please sign in to comment.