diff --git a/include/pro/pro.hpp b/include/pro/pro.hpp index b245436..995e1ef 100644 --- a/include/pro/pro.hpp +++ b/include/pro/pro.hpp @@ -241,7 +241,7 @@ class ProWrapper : public Napi::ObjectWrap { // "requestVersion": number, // "masterPrivKeyHex": string, // "unixTsMs": number, - // "withPaymentHistory": boolean, + // "count": number, // } assertInfoLength(info, 1); @@ -255,12 +255,10 @@ class ProWrapper : public Napi::ObjectWrap { 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(); 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"); @@ -273,7 +271,7 @@ class ProWrapper : public Napi::ObjectWrap { static_cast(requestVersion.Int32Value()), to_span(master_privkey_decoded), unix_ts_ms, - withPaymentHistory); + count); return json; }); diff --git a/types/pro/pro.d.ts b/types/pro/pro.d.ts index 30790a2..46b9627 100644 --- a/types/pro/pro.d.ts +++ b/types/pro/pro.d.ts @@ -181,7 +181,7 @@ declare module 'libsession_util_nodejs' { args: WithMasterPrivKeyHex & WithRequestVersion & WithUnixTsMs & { - withPaymentHistory: boolean; + count: number; } ) => string; };