Skip to content

Commit

Permalink
Fix: improved checks in rate order
Browse files Browse the repository at this point in the history
  • Loading branch information
arkanoider committed Dec 23, 2024
1 parent 81f4110 commit a6bcf1f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/rate_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,14 @@ pub async fn update_user_reputation_action(

// Find the counterpart public key
if message_sender == buyer {
counterpart = order.master_seller_pubkey.unwrap();
counterpart = order
.master_seller_pubkey
.ok_or_else(|| Error::msg("Missing master seller pubkey"))?;
buyer_rating = true;
} else if message_sender == seller {
counterpart = order.master_buyer_pubkey.unwrap();
counterpart = order
.master_buyer_pubkey
.ok_or_else(|| Error::msg("Missing master buyer pubkey"))?;
seller_rating = true;
};

Expand Down

0 comments on commit a6bcf1f

Please sign in to comment.