chore(frontend): make Merkle proofs optional (#198)

* Make frontend Merkle proofs optional

* Code review

* Clippy
This commit is contained in:
Ahmad Afuni 2025-04-17 21:51:02 +10:00 committed by GitHub
parent 281f57f0a0
commit 17e6c2a092
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 98 additions and 48 deletions

View file

@ -13,6 +13,18 @@ pub enum OperationArg {
Entry(String, Value),
}
impl OperationArg {
/// Extracts the value underlying literal and `ValueOf` statement
/// operation args.
pub(crate) fn value(&self) -> Option<&Value> {
match self {
Self::Literal(v) => Some(v),
Self::Statement(Statement::ValueOf(_, v)) => Some(v),
_ => None,
}
}
}
impl fmt::Display for OperationArg {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {