From ccd12735ece7d6a7a3ae5cc8f37bdd731a244fd4 Mon Sep 17 00:00:00 2001 From: Alexander Schmidt Date: Fri, 8 Dec 2023 15:53:35 +0100 Subject: [PATCH] rename instead of serde rename --- bindings/core/src/method/utils.rs | 1 - bindings/nodejs/lib/types/utils/bridge/utils.ts | 2 +- bindings/nodejs/lib/utils/utils.ts | 7 +++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bindings/core/src/method/utils.rs b/bindings/core/src/method/utils.rs index 1b28884727..c45583acb4 100644 --- a/bindings/core/src/method/utils.rs +++ b/bindings/core/src/method/utils.rs @@ -57,7 +57,6 @@ pub enum UtilsMethod { #[serde(rename_all = "camelCase")] BlockId { block: BlockDto, - #[serde(rename = "params")] protocol_parameters: ProtocolParameters, }, /// Returns the transaction ID (Blake2b256 hash of the provided transaction payload) diff --git a/bindings/nodejs/lib/types/utils/bridge/utils.ts b/bindings/nodejs/lib/types/utils/bridge/utils.ts index 39aea64fc2..f6fa704197 100644 --- a/bindings/nodejs/lib/types/utils/bridge/utils.ts +++ b/bindings/nodejs/lib/types/utils/bridge/utils.ts @@ -88,7 +88,7 @@ export interface __BlockIdMethod__ { name: 'blockId'; data: { block: Block; - params: ProtocolParameters; + protocolParameters: ProtocolParameters; }; } diff --git a/bindings/nodejs/lib/utils/utils.ts b/bindings/nodejs/lib/utils/utils.ts index f2b480c8b3..2753da0e5d 100644 --- a/bindings/nodejs/lib/utils/utils.ts +++ b/bindings/nodejs/lib/utils/utils.ts @@ -191,12 +191,15 @@ export class Utils { * @param params The network protocol parameters. * @returns The corresponding block ID. */ - static blockId(block: Block, params: ProtocolParameters): BlockId { + static blockId( + block: Block, + protocolParameters: ProtocolParameters, + ): BlockId { return callUtilsMethod({ name: 'blockId', data: { block, - params, + protocolParameters, }, }); }