Skip to content

Commit

Permalink
fix get_all_orders_claim function in zkdex smart contract
Browse files Browse the repository at this point in the history
  • Loading branch information
Peixer committed Jan 17, 2024
1 parent e6983c2 commit 12387c7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/deployments/zkdex/zkdex.contract

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/deployments/zkdex/zkdex.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source": {
"hash": "0x74395e1245f243a1137bda4c9a4a55b95ad9f79797baca83a1541bd805aa267c",
"hash": "0x074d82affe64989a4853b3c7f6f674bc6f13efe2d0aa5124d9ea7a2397f06b55",
"language": "ink! 4.3.0",
"compiler": "rustc 1.75.0",
"build_info": {
Expand Down
Binary file modified contracts/deployments/zkdex/zkdex.wasm
Binary file not shown.
5 changes: 4 additions & 1 deletion contracts/src/zkdex/zkdex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ mod zkdex {
pub fn get_all_orders_claim(&self) -> Vec<OrderClaim> {
let mut orders_claim: Vec<OrderClaim> = Vec::new();
for i in 0..self.next_order_nonce {
orders_claim.push(self.orders_claim.get(&i).unwrap());
let order_claim = self.orders_claim.get(&i);
if let Some(claim) = order_claim {
orders_claim.push(claim);
}
}
orders_claim
}
Expand Down

0 comments on commit 12387c7

Please sign in to comment.