Skip to content

Commit 799d2bb

Browse files
committed
chore: add format so windows can build
1 parent 8ec5bce commit 799d2bb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

include/utilities.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
22

3+
#include <fmt/format.h>
34
#include <napi.h>
45

56
#include <optional>
@@ -382,7 +383,7 @@ template <std::size_t N>
382383
std::array<uint8_t, N> from_hex_to_array(std::string x) {
383384
std::string as_hex = oxenc::from_hex(x);
384385
if (as_hex.size() != N) {
385-
throw std::invalid_argument(std::format(
386+
throw std::invalid_argument(fmt::format(
386387
"from_hex_to_array: Decoded hex size mismatch: expected {}, got {}",
387388
N,
388389
as_hex.size()));
@@ -409,7 +410,7 @@ concept HasSize = requires(T t) {
409410
template <HasSize T>
410411
void assert_length(const T& x, size_t n, std::string_view base_identifier) {
411412
if (x.size() != n) {
412-
throw std::invalid_argument(std::format(
413+
throw std::invalid_argument(fmt::format(
413414
"assert_length: expected {}, got {} for {}", n, x.size(), base_identifier));
414415
}
415416
}

src/user_config.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,7 @@ Napi::Value UserConfigWrapper::generateProMasterKey(const Napi::CallbackInfo& in
281281
assert_length(ed25519_seed_cpp_hex, 64, "generateProMasterKey");
282282
auto converted = from_hex_to_vector(ed25519_seed_cpp_hex);
283283

284-
auto pro_master_key_hex =
285-
session::ed25519::ed25519_pro_key_pair_for_ed25519_seed(converted);
284+
auto pro_master_key_hex = session::ed25519::ed25519_pro_privkey_for_ed25519_seed(converted);
286285
auto obj = Napi::Object::New(info.Env());
287286
obj["proMasterKey"] = toJs(info.Env(), pro_master_key_hex);
288287

0 commit comments

Comments
 (0)