-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Description
Is there an existing issue for this?
- I have searched the existing issues
SDK version
7.0.8
Lit Network
DatilDev
Description of the bug/issue
When using multi-condition ACCs without explicitly specifying a boolean operator between conditions, the behavior differs between the two encryption interfaces:
- litNodeClient.encrypt/decrypt: Multi-condition ACCs without an operator are implicitly treated as an "and" condition, and the functions work as expected.
- @lit-protocol/encryption (encryptUint8Array, encryptString, decryptToFile, etc.): The same multi-condition ACCs trigger an InvalidParamType error stating:
Invalid params: Invalid boolean Access Control Conditions
Severity of the bug
Low as there is a clear solution; it did not cause any impact on my integration
Steps To Reproduce
- Run in any environment
- Use litNodeClient.encrypt with the ACCs; no error
- Decrypt using litNodeClient.decrypt -> successful decryption
- Use encryptUint8Array; Invalid params error
Link to code
const sameAddressACCs = [
{
contractAddress: "",
standardContractType: "",
method: "",
chain: "ethereum",
parameters: [":userAddress"],
returnValueTest: {
comparator: "=",
value: ethersWallet.address
}
}
];
const timeACCs = [
{
contractAddress: "ipfs://QmbBPZu1Fijm1UWuh53yuy5fBKWwiygpsspX9xd83QgNgo",
standardContractType: "LitAction",
chain: "ethereum",
method: "checkCurrentTime",
parameters: ["00:00", "23:59"],
returnValueTest: {
comparator: "=",
value: "true"
}
}
];
const multiConditionACCs = [
...sameAddressACCs,
// {operator: "and"},
...timeACCs
];Anything else?
No response
Metadata
Metadata
Assignees
Labels
No labels