File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,9 @@ library LibBlob {
300300 encoded[1 ] = params.source.encodeCborBlobHashOrNodeId ();
301301 encoded[2 ] = params.blobHash.encodeCborBlobHashOrNodeId ();
302302 // TODO: this value is currently hardcoded, but it'll eventually use the same method above
303- encoded[3 ] = hex "0000000000000000000000000000000000000000000000000000000000000000 " .encodeCborFixedArray ();
303+ encoded[3 ] = bytes (params.metadataHash).length == 0
304+ ? hex "0000000000000000000000000000000000000000000000000000000000000000 " .encodeCborFixedArray ()
305+ : params.metadataHash.encodeCborBlobHashOrNodeId ();
304306 encoded[4 ] = encodeSubscriptionId (params.subscriptionId);
305307 encoded[5 ] = params.size.encodeCborUint64 ();
306308 encoded[6 ] = params.ttl == 0 ? LibWasm.encodeCborNull () : params.ttl.encodeCborUint64 ();
Original file line number Diff line number Diff line change @@ -145,7 +145,9 @@ library LibBucket {
145145 encoded[2 ] = params.blobHash.encodeCborBlobHashOrNodeId ();
146146 // TODO: this currently is hardcoded to a 32 byte array of all zeros, but should use the method above
147147 // Once https://github.com/hokunet/ipc/issues/300 is merged, this'll need to change
148- encoded[3 ] = hex "0000000000000000000000000000000000000000000000000000000000000000 " .encodeCborFixedArray ();
148+ encoded[3 ] = bytes (params.recoveryHash).length == 0
149+ ? hex "0000000000000000000000000000000000000000000000000000000000000000 " .encodeCborFixedArray ()
150+ : params.recoveryHash.encodeCborBlobHashOrNodeId ();
149151 encoded[4 ] = params.size.encodeCborUint64 ();
150152 encoded[5 ] = params.ttl == 0 ? LibWasm.encodeCborNull () : params.ttl.encodeCborUint64 ();
151153 encoded[6 ] = params.metadata.encodeCborKeyValueMap ();
You can’t perform that action at this time.
0 commit comments