chore(frontend): make Merkle proofs optional (#198)
* Make frontend Merkle proofs optional * Code review * Clippy
This commit is contained in:
parent
281f57f0a0
commit
17e6c2a092
7 changed files with 98 additions and 48 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue