Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions include/pro/pro.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class ProWrapper : public Napi::ObjectWrap<ProWrapper> {
// "requestVersion": number,
// "masterPrivKeyHex": string,
// "unixTsMs": number,
// "withPaymentHistory": boolean,
// "count": number,
// }

assertInfoLength(info, 1);
Expand All @@ -255,12 +255,10 @@ class ProWrapper : public Napi::ObjectWrap<ProWrapper> {

assertIsNumber(first.Get("requestVersion"), "proStatusRequestBody.requestVersion");
assertIsNumber(first.Get("unixTsMs"), "proStatusRequestBody.unixTsMs");
assertIsBoolean(
first.Get("withPaymentHistory"), "proStatusRequestBody.withPaymentHistory");
assertIsNumber(first.Get("count"), "proStatusRequestBody.count");
auto requestVersion = first.Get("requestVersion").As<Napi::Number>();
auto unix_ts_ms = toCppSysMs(first.Get("unixTsMs"), "proStatusRequestBody.unixTsMs");
auto withPaymentHistory = toCppBoolean(
first.Get("withPaymentHistory"), "proStatusRequestBody.withPaymentHistory");
auto count = toCppInteger(first.Get("count"), "proStatusRequestBody.count");
assertIsString(first.Get("masterPrivKeyHex"), "proStatusRequestBody.masterPrivKeyHex");

auto master_privkey_js = first.Get("masterPrivKeyHex");
Expand All @@ -273,7 +271,7 @@ class ProWrapper : public Napi::ObjectWrap<ProWrapper> {
static_cast<uint8_t>(requestVersion.Int32Value()),
to_span(master_privkey_decoded),
unix_ts_ms,
withPaymentHistory);
count);

return json;
});
Expand Down
2 changes: 1 addition & 1 deletion types/pro/pro.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ declare module 'libsession_util_nodejs' {
args: WithMasterPrivKeyHex &
WithRequestVersion &
WithUnixTsMs & {
withPaymentHistory: boolean;
count: number;
}
) => string;
};
Expand Down
Loading