From e19902c6f242f4db4cfcf1d9551832c9c461336b Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 25 Oct 2024 18:02:28 +0700 Subject: [PATCH] fix(dapi): keys that end with '-bin' must have Buffer values --- .../grpcServer/handlers/createGrpcErrorFromDriveResponse.js | 4 ++-- packages/rs-sdk/src/error.rs | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/dapi/lib/grpcServer/handlers/createGrpcErrorFromDriveResponse.js b/packages/dapi/lib/grpcServer/handlers/createGrpcErrorFromDriveResponse.js index 8d3e34bd65..a156d9c266 100644 --- a/packages/dapi/lib/grpcServer/handlers/createGrpcErrorFromDriveResponse.js +++ b/packages/dapi/lib/grpcServer/handlers/createGrpcErrorFromDriveResponse.js @@ -115,9 +115,9 @@ async function createGrpcErrorFromDriveResponse(code, info) { // DPP errors if (code >= 10000 && code < 50000) { const consensusMetadata = { - code, ...createRawMetadata(data), - 'dash-serialized-consensus-error-bin': serializedConsensusError, + code, + 'dash-serialized-consensus-error-bin': Buffer.from(serializedConsensusError), }; let consensusError; diff --git a/packages/rs-sdk/src/error.rs b/packages/rs-sdk/src/error.rs index 51ba342a49..ccab34a214 100644 --- a/packages/rs-sdk/src/error.rs +++ b/packages/rs-sdk/src/error.rs @@ -1,5 +1,4 @@ //! Definitions of errors -use dapi_grpc::tonic; use dpp::consensus::ConsensusError; use dpp::serialization::PlatformDeserializable; use dpp::version::PlatformVersionError;