Skip to content

Commit 78837de

Browse files
committed
fix: track validity of pro proof with ValidOrExpired
we only care about those two states
1 parent ac9a0ce commit 78837de

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/pro/types.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ struct toJs_impl<session::DecodedPro> {
7171

7272
obj["proStatus"] =
7373
toJs(env,
74-
decoded_pro.status == ProStatus::InvalidProBackendSig ? "InvalidProBackendSig"
75-
: decoded_pro.status == ProStatus::InvalidUserSig ? "InvalidUserSig"
76-
: "Valid");
74+
decoded_pro.status == ProStatus::Valid ? "ValidOrExpired"
75+
: decoded_pro.status == ProStatus::Expired ? "ValidOrExpired"
76+
: "Invalid");
7777
obj["proProof"] = toJs(env, decoded_pro.proof);
7878
obj["proFeaturesBitset"] = proFeaturesToJsBitset(env, decoded_pro.features);
7979

types/pro/pro.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ declare module 'libsession_util_nodejs' {
1010
proBackendPubkeyHex: string;
1111
};
1212

13-
type ProStatus = 'InvalidProBackendSig' | 'InvalidUserSig' | 'Valid';
13+
type ProStatus = 'ValidOrExpired' | 'Invalid';
1414
type WithProFeaturesBitset = { proFeaturesBitset: bigint };
1515
type WithGenIndexHash = { genIndexHashB64: string };
1616

0 commit comments

Comments
 (0)