From 62791df96a7a0fdcd959a2c8e6d7d8c4dd613961 Mon Sep 17 00:00:00 2001 From: higherordertech Date: Thu, 13 Jun 2024 14:21:52 +1000 Subject: [PATCH] fix: change precondition of AchainableLitHoldingAmount VC value being true to require amount to be greater than 0 --- .../core/credentials/src/achainable/lit_holding_amount.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tee-worker/litentry/core/credentials/src/achainable/lit_holding_amount.rs b/tee-worker/litentry/core/credentials/src/achainable/lit_holding_amount.rs index 18b5f23b2f..a7ac2e0301 100644 --- a/tee-worker/litentry/core/credentials/src/achainable/lit_holding_amount.rs +++ b/tee-worker/litentry/core/credentials/src/achainable/lit_holding_amount.rs @@ -67,7 +67,8 @@ impl AchainableLitHoldingAmountUpdate for Credential { } self.credential_subject.assertions.push(assertion); - self.credential_subject.values.push(true); + // The credential value should be true if amount > ranges[0]. + self.credential_subject.values.push(amount > lit_holding_amount.get_range()[0]); let info = lit_holding_amount.get_info(); self.add_subject_info(info.1, info.0);