Skip to content

Commit e19902c

Browse files
committed
fix(dapi): keys that end with '-bin' must have Buffer values
1 parent 3ca8abe commit e19902c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/dapi/lib/grpcServer/handlers/createGrpcErrorFromDriveResponse.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ async function createGrpcErrorFromDriveResponse(code, info) {
115115
// DPP errors
116116
if (code >= 10000 && code < 50000) {
117117
const consensusMetadata = {
118-
code,
119118
...createRawMetadata(data),
120-
'dash-serialized-consensus-error-bin': serializedConsensusError,
119+
code,
120+
'dash-serialized-consensus-error-bin': Buffer.from(serializedConsensusError),
121121
};
122122

123123
let consensusError;

packages/rs-sdk/src/error.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//! Definitions of errors
2-
use dapi_grpc::tonic;
32
use dpp::consensus::ConsensusError;
43
use dpp::serialization::PlatformDeserializable;
54
use dpp::version::PlatformVersionError;

0 commit comments

Comments
 (0)