From 98303bd45ef75068cf433ba6a907889cac81dedf Mon Sep 17 00:00:00 2001 From: classicalliu Date: Mon, 20 Dec 2021 18:06:42 +0800 Subject: [PATCH] feat: Add gw_get_last_submitted_info --- packages/api-server/src/methods/modules/gw.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/api-server/src/methods/modules/gw.ts b/packages/api-server/src/methods/modules/gw.ts index dc96c4ac..7b67db67 100644 --- a/packages/api-server/src/methods/modules/gw.ts +++ b/packages/api-server/src/methods/modules/gw.ts @@ -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[]) { @@ -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(