@@ -226,8 +226,7 @@ Napi::Value MetaGroupWrapper::metaMakeDump(const Napi::CallbackInfo& info) {
226
226
// NOTE: the keys have to be in ascii-sorted order:
227
227
combined.append (" info" , session::to_string (this ->meta_group ->info ->make_dump ()));
228
228
combined.append (" keys" , session::to_string (this ->meta_group ->keys ->make_dump ()));
229
- combined.append (
230
- " members" , session::to_string (this ->meta_group ->members ->make_dump ()));
229
+ combined.append (" members" , session::to_string (this ->meta_group ->members ->make_dump ()));
231
230
auto to_dump = std::move (combined).str ();
232
231
233
232
return session::to_vector (to_dump);
@@ -328,7 +327,7 @@ Napi::Value MetaGroupWrapper::metaMerge(const Napi::CallbackInfo& info) {
328
327
assertIsArray (groupInfo);
329
328
auto asArr = groupInfo.As <Napi::Array>();
330
329
331
- std::vector<std::pair<std::string, std::span< const unsigned char >>> conf_strs;
330
+ std::vector<std::pair<std::string, std::vector< unsigned char >>> conf_strs;
332
331
conf_strs.reserve (asArr.Length ());
333
332
334
333
for (uint32_t i = 0 ; i < asArr.Length (); i++) {
@@ -342,7 +341,7 @@ Napi::Value MetaGroupWrapper::metaMerge(const Napi::CallbackInfo& info) {
342
341
assertIsUInt8Array (itemObject.Get (" data" ), " groupInfo merge" );
343
342
conf_strs.emplace_back (
344
343
toCppString (itemObject.Get (" hash" ), " meta.merge" ),
345
- toCppBufferView (itemObject.Get (" data" ), " meta.merge" ));
344
+ toCppBuffer (itemObject.Get (" data" ), " meta.merge" ));
346
345
}
347
346
348
347
if (conf_strs.size ()) {
@@ -355,7 +354,7 @@ Napi::Value MetaGroupWrapper::metaMerge(const Napi::CallbackInfo& info) {
355
354
assertIsArray (groupMember);
356
355
auto asArr = groupMember.As <Napi::Array>();
357
356
358
- std::vector<std::pair<std::string, std::span< const unsigned char >>> conf_strs;
357
+ std::vector<std::pair<std::string, std::vector< unsigned char >>> conf_strs;
359
358
conf_strs.reserve (asArr.Length ());
360
359
361
360
for (uint32_t i = 0 ; i < asArr.Length (); i++) {
@@ -369,7 +368,7 @@ Napi::Value MetaGroupWrapper::metaMerge(const Napi::CallbackInfo& info) {
369
368
assertIsUInt8Array (itemObject.Get (" data" ), " groupMember merge" );
370
369
conf_strs.emplace_back (
371
370
toCppString (itemObject.Get (" hash" ), " meta.merge" ),
372
- toCppBufferView (itemObject.Get (" data" ), " meta.merge" ));
371
+ toCppBuffer (itemObject.Get (" data" ), " meta.merge" ));
373
372
}
374
373
375
374
if (conf_strs.size ()) {
@@ -822,7 +821,8 @@ Napi::Value MetaGroupWrapper::makeSwarmSubAccount(const Napi::CallbackInfo& info
822
821
assertIsString (info[0 ]);
823
822
824
823
auto memberPk = toCppString (info[0 ], " makeSwarmSubAccount" );
825
- std::vector<unsigned char > subaccount = this ->meta_group ->keys ->swarm_make_subaccount (memberPk);
824
+ std::vector<unsigned char > subaccount =
825
+ this ->meta_group ->keys ->swarm_make_subaccount (memberPk);
826
826
827
827
session::nodeapi::checkOrThrow (
828
828
subaccount.size () == 100 , " expected subaccount to be 100 bytes long" );
@@ -837,7 +837,8 @@ Napi::Value MetaGroupWrapper::swarmSubAccountToken(const Napi::CallbackInfo& inf
837
837
assertIsString (info[0 ]);
838
838
839
839
auto memberPk = toCppString (info[0 ], " swarmSubAccountToken" );
840
- std::vector<unsigned char > subaccount = this ->meta_group ->keys ->swarm_subaccount_token (memberPk);
840
+ std::vector<unsigned char > subaccount =
841
+ this ->meta_group ->keys ->swarm_subaccount_token (memberPk);
841
842
842
843
session::nodeapi::checkOrThrow (
843
844
subaccount.size () == 36 , " expected subaccount token to be 36 bytes long" );
0 commit comments