From 58c1682b4f44bf47a766b314cb8b177e078a1841 Mon Sep 17 00:00:00 2001 From: Ruan Pingcheng Date: Mon, 2 Sep 2024 13:59:05 +0800 Subject: [PATCH] default 0 equity for missing token --- crates/zk-por-core/src/parser.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/crates/zk-por-core/src/parser.rs b/crates/zk-por-core/src/parser.rs index ffc89dc..d0980f6 100644 --- a/crates/zk-por-core/src/parser.rs +++ b/crates/zk-por-core/src/parser.rs @@ -273,13 +273,11 @@ pub fn parse_account_state(parsed_data: &Map, tokens: &Vec().unwrap()); - parsed_debts.push(parsed_debt); - } else { - panic!("fail to find debt for token: {:?} in accountID {:?}", token, account_id); + parsed_debt = F::from_canonical_u64(val.as_str().unwrap().parse::().unwrap()); } + parsed_debts.push(parsed_debt); } } else { // if there is no debt, we fill it with zero